/* style.css - Scuola Organetto mit Sprachwahl, Dark Mode & Pan/Zoom */
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --accent:#2b7cff;
  --muted:#6b7280;
  --text:#111;
  --radius:10px;
}
/* Dark theme variables */
.theme-dark {
  --bg:#0f1724;
  --card:#0b1220;
  --accent:#4f8cff;
  --muted:#9aa6bf;
  --text:#e6eef9;
}

*{box-sizing:border-box}
body { font-family: system-ui, Arial, sans-serif; margin:0; padding:0; background:var(--bg); color:var(--text); }
.container { padding:1rem; max-width:1100px; margin:0 auto; }

/* Header */
.site-header { background:linear-gradient(180deg,var(--card) 0%, rgba(255,255,255,0.02) 100%); border-bottom:1px solid rgba(0,0,0,0.04); }
.theme-dark .site-header { border-bottom-color: rgba(255,255,255,0.04); }
.header-inner { padding:1rem; max-width:1100px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.header-left { display:flex; flex-direction:column; gap:.25rem; }
h1 { margin:0; font-size:1.4rem; color:var(--text); }
.lead { margin:0; color:var(--muted); font-size:0.95rem; }

/* Header right controls */
.header-right { display:flex; gap:0.75rem; align-items:center; }
.control { display:flex; align-items:center; gap:0.5rem; }
.language-control select { padding:6px 8px; border-radius:6px; border:1px solid rgba(0,0,0,0.08); background:var(--card); color:var(--text); }
.theme-btn { background:transparent; border:1px solid rgba(0,0,0,0.06); padding:6px 8px; border-radius:6px; cursor:pointer; color:var(--text); }
.theme-btn:hover { transform:translateY(-2px); }

/* Section title */
.section-title { margin:1rem 0 .5rem 0; color:var(--muted); font-size:1rem; }

/* Course row: kleine, einzeilige Pills */
.course-row {
  display:flex;
  gap:0.5rem;
  align-items:center;
  flex-wrap:nowrap;
  overflow-x:auto;
  padding:0.25rem 0;
  margin-top:0.25rem;
}
.course-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#fff;
  background:linear-gradient(135deg,var(--accent),#1b5fd6);
  border-radius:999px;
  padding:0.45rem 0.9rem;
  height:36px;
  min-width:120px;
  white-space:nowrap;
  box-shadow: 0 6px 14px rgba(15,23,42,0.06);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  font-weight:600;
  font-size:0.95rem;
}
.course-pill:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,23,42,0.10); opacity:0.98; }
.course-title { display:inline-block; text-align:center; }

/* Videos list vertical */
.videos-list { display:flex; flex-direction:column; gap:1rem; margin-top:0.75rem; }
.video-item { background:var(--card); padding:0.75rem; border-radius:8px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }
.theme-dark .video-item { box-shadow: 0 1px 6px rgba(0,0,0,0.08); }
.video-name { margin:0 0 .5rem 0; font-size:0.95rem; color:var(--text); }

/* Video wrapper: overflow hidden, pointer cursor bei Zoom */
.video-wrap { width:100%; display:flex; justify-content:center; align-items:center; background:#000; border-radius:6px; overflow:hidden; touch-action: none; }

/* Video selbst: transform-origin center, will-change für Performance */
.player { width:100%; max-width:100%; height:auto; transform-origin:center center; transition: transform .12s ease; display:block; will-change: transform; cursor: grab; }

/* Beim Dragging Cursor */
.video-wrap:active .player,
.player.dragging { cursor: grabbing; }

/* Fullscreen: stelle sicher, dass video im fullscreen sichtbar bleibt */
:fullscreen .video-wrap,
:-webkit-full-screen .video-wrap {
  width:100vw;
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
}

/* Wenn im Fullscreen, das Video soll nicht von Browser-UI beschnitten werden */
:fullscreen video,
:-webkit-full-screen video {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
}

/* Controls layout */
.controls { margin-top:.5rem; display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.controls label { font-size:.9rem; color:var(--muted); display:flex; gap:.5rem; align-items:center; }
input[type="range"] { vertical-align: middle; }

/* Muted text */
.muted { color:var(--muted); }

/* Accessibility helper */
.sr-only { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Responsive tweaks */
@media (max-width:720px){
  .course-pill { min-width:100px; height:34px; padding:0.35rem 0.7rem; font-size:0.9rem; }
  .header-inner { flex-direction:column; align-items:flex-start; gap:.5rem; }
}
@media (max-width:520px){
  .controls { gap:.5rem; }
}