/* ============================================================
   tutorial.wravel.de – Design nach wravel.de
   Inter · Navy #0A1628 · Blau #0066FF · Türkis #00D4AA
   ============================================================ */

@font-face { font-family: Inter; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/inter-v20-latin-300.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-v20-latin-regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-v20-latin-500.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-v20-latin-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-v20-latin-700.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/inter-v20-latin-800.woff2) format("woff2"); }

:root {
  --primary: #0066FF;
  --primary-dark: #0052CC;
  --primary-light: #E6F0FF;
  --secondary: #00D4AA;
  --dark: #0A1628;
  --gray-900: #1A2744;
  --gray-700: #3D4F6F;
  --gray-500: #6B7C99;
  --gray-300: #A3B3CC;
  --gray-100: #E8EDF5;
  --white: #FFFFFF;
  --bg-light: #F6F8FC;
  --gradient-primary: linear-gradient(135deg, #0066FF 0%, #00D4AA 100%);
  --gradient-dark: linear-gradient(180deg, #0A1628 0%, #1A2744 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .16);
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 600 15px/1.2 Inter, sans-serif;
  padding: 13px 26px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--gradient-primary); color: var(--white); box-shadow: 0 8px 24px rgba(0, 102, 255, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 102, 255, .45); }
.btn-white { background: var(--white); color: var(--dark); box-shadow: var(--shadow-sm); padding: 10px 20px; }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.logo { display: inline-flex; flex-direction: column; line-height: 1; }
.logo-word {
  font-weight: 800; font-style: italic; font-size: 26px; letter-spacing: -.5px;
  color: var(--white);
}
.logo-sub {
  align-self: flex-end;
  font-size: 9px; font-weight: 600; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--secondary); margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: rgba(255, 255, 255, .85); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--gradient-dark);
  color: var(--white);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero::before { width: 480px; height: 480px; background: rgba(0, 102, 255, .28); top: -180px; right: -120px; }
.hero::after { width: 380px; height: 380px; background: rgba(0, 212, 170, .16); bottom: -160px; left: -100px; }

.hero-inner { position: relative; z-index: 1; padding: 88px 24px 72px; max-width: 820px; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; line-height: 1.12; letter-spacing: -1px; }
.hero-sub { margin-top: 20px; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--gray-300); max-width: 560px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.stat-card {
  min-width: 150px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-card strong { font-size: 1.35rem; font-weight: 800; }
.stat-card span { font-size: .8rem; color: var(--gray-300); }

/* ---------- Abschnitt (hell) ---------- */
.section-light { background: var(--bg-light); padding: 72px 0 88px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--gray-500); margin-top: 8px; max-width: 620px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 8px; }
.search-field {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--gray-100); border-radius: 999px;
  padding: 0 18px; height: 48px; color: var(--gray-500);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 102, 255, .12); }
.search-field input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: 500 15px Inter, sans-serif; color: var(--dark); height: 100%;
}
.sort-field select {
  height: 48px; border-radius: 999px; border: 1px solid var(--gray-100);
  background: var(--white); padding: 0 18px;
  font: 500 15px Inter, sans-serif; color: var(--dark);
  box-shadow: var(--shadow-sm); cursor: pointer; outline: 0;
}
.sort-field select:focus-visible { border-color: var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--gray-100); background: var(--white); color: var(--gray-700);
  border-radius: 999px; padding: 8px 16px; font: 600 13px Inter, sans-serif;
  cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--gray-300); }
.chip.is-active { background: var(--dark); border-color: var(--dark); color: var(--white); }

/* ---------- Video-Grid ---------- */
.video-grid {
  margin-top: 28px;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.video-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.video-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.video-card.is-hidden { display: none; }

.thumb {
  position: relative; display: block; aspect-ratio: 16 / 9;
  background: var(--gradient-dark); overflow: hidden;
}
.thumb-media { width: 100%; height: 100%; object-fit: cover; }
.thumb-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0) 45%, rgba(10, 22, 40, .55) 100%);
  transition: background .25s ease;
}
.play-bubble {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--primary);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.play-bubble svg { margin-left: 3px; }
.video-card:hover .play-bubble { transform: scale(1.1); background: var(--gradient-primary); color: var(--white); }

.badge-duration {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(10, 22, 40, .82); color: var(--white);
  font: 600 12px/1 Inter, sans-serif; padding: 5px 9px; border-radius: 7px;
}
.badge-duration:empty { display: none; }
.badge-done {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0, 212, 170, .95); color: #04352B;
  font: 700 11px/1 Inter, sans-serif; padding: 5px 9px; border-radius: 999px;
}
.card-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: rgba(255, 255, 255, .25);
  opacity: 0; transition: opacity .2s;
}
.card-progress.is-visible { opacity: 1; }
.card-progress-fill { display: block; height: 100%; width: 0; background: var(--gradient-primary); }

.card-body { padding: 16px 18px 18px; }
.card-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -.2px; }
.card-meta { margin-top: 5px; font-size: .8rem; color: var(--gray-500); }

.no-results { margin-top: 40px; text-align: center; color: var(--gray-500); font-weight: 500; }

/* ---------- Leerer Zustand ---------- */
.empty-state {
  margin-top: 40px; text-align: center;
  background: var(--white); border: 2px dashed var(--gray-100);
  border-radius: var(--radius); padding: 72px 24px;
}
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.25rem; font-weight: 700; }
.empty-state p { color: var(--gray-500); margin-top: 8px; }
.empty-state code {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 6px; font-size: .9em;
}

/* ---------- CTA-Band ---------- */
.cta-band { background: var(--gradient-dark); color: var(--white); position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(0, 102, 255, .22); filter: blur(90px); top: -160px; left: 50%; transform: translateX(-50%);
}
.cta-inner { position: relative; text-align: center; padding: 72px 24px; }
.cta-inner h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
.cta-inner p { color: var(--gray-300); margin: 12px 0 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--gray-300); }
.footer-grid {
  display: grid; gap: 36px; padding: 56px 24px 32px;
  grid-template-columns: 1.2fr 1fr auto; align-items: start;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-tagline { margin-top: 14px; font-size: .9rem; color: var(--gray-500); }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--gray-300); font-size: .95rem; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-badges { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badges li {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px; padding: 7px 14px; font-size: .8rem; white-space: nowrap;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 24px; font-size: .85rem; color: var(--gray-500);
}

/* ---------- Rechtsseiten ---------- */
.page-hero { background: var(--gradient-dark); color: var(--white); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: rgba(0, 102, 255, .25); filter: blur(90px); top: -140px; right: -80px;
}
.page-hero-inner { position: relative; padding: 64px 24px; }
.page-badge {
  display: inline-block; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px; padding: 6px 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--secondary); margin-bottom: 18px;
}
.page-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -.5px; }

.legal { background: var(--bg-light); padding: 64px 0 88px; }
.legal-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  max-width: 860px; padding: clamp(28px, 5vw, 56px);
}
.legal-card h2 {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.3px;
  margin: 40px 0 12px; padding-top: 8px;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card h2::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: var(--gradient-primary); margin-top: 8px;
}
.legal-card h3 { font-size: 1.05rem; font-weight: 700; margin: 26px 0 8px; }
.legal-card p, .legal-card ul { color: var(--gray-700); margin-bottom: 14px; font-size: .97rem; }
.legal-card ul { padding-left: 22px; }
.legal-card a { font-weight: 600; word-break: break-word; }
.legal-card .address { font-style: normal; line-height: 1.7; }

/* ---------- Videoplayer ---------- */
.player-dialog {
  border: 0; padding: 0; background: transparent;
  width: min(1060px, 100vw); max-width: 100vw; max-height: 100vh;
  margin: auto; /* zentriert – der globale Margin-Reset würde sonst greifen */
}
.player-dialog::backdrop {
  background: rgba(4, 10, 20, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.player-shell {
  background: var(--dark); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.player-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px;
}
.player-title {
  color: var(--white); font-size: 1rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-actions { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .07); color: var(--white);
  transition: background .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }

.player-stage { position: relative; background: #000; aspect-ratio: 16 / 9; }
.player-stage video { width: 100%; height: 100%; }

.stage-overlay {
  position: absolute; inset: 0; border: 0; cursor: pointer;
  background: transparent; display: grid; place-items: center;
}
.big-play {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: var(--gradient-primary); color: var(--white);
  box-shadow: 0 12px 40px rgba(0, 102, 255, .5);
  transition: transform .2s ease, opacity .2s ease;
}
.big-play svg { margin-left: 4px; }
.stage-overlay:hover .big-play { transform: scale(1.08); }
.player-stage.is-playing .big-play { opacity: 0; transform: scale(.6); pointer-events: none; }

.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 10px;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0) 0%, rgba(10, 22, 40, .85) 70%);
  transition: opacity .25s ease;
}
.player-stage.is-idle .player-controls { opacity: 0; pointer-events: none; }
.player-stage.is-idle { cursor: none; }

.controls-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.ctrl-btn {
  display: grid; place-items: center; min-width: 40px; height: 40px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--white);
  transition: background .15s;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, .14); }

.time { color: var(--gray-300); font-size: .82rem; font-variant-numeric: tabular-nums; margin-left: 4px; white-space: nowrap; }
.time #timeCurrent { color: var(--white); font-weight: 600; }
.spacer { flex: 1; }

/* Seek- & Lautstärkeregler */
input[type="range"].seek, input[type="range"].vol {
  -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer; display: block;
}
.seek { width: 100%; height: 22px; --played: 0%; --buffered: 0%; }
.seek::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg,
    var(--secondary) 0%, var(--primary) var(--played),
    rgba(255, 255, 255, .38) var(--played), rgba(255, 255, 255, .38) var(--buffered),
    rgba(255, 255, 255, .16) var(--buffered));
}
.seek::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg,
    var(--secondary) 0%, var(--primary) var(--played),
    rgba(255, 255, 255, .38) var(--played), rgba(255, 255, 255, .38) var(--buffered),
    rgba(255, 255, 255, .16) var(--buffered));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%; border: 0;
  background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  margin-top: -5px; transition: transform .15s;
}
.seek::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: 0;
  background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.seek:hover::-webkit-slider-thumb { transform: scale(1.25); }

.vol-group { display: flex; align-items: center; }
.vol { width: 78px; height: 22px; --level: 100%; }
.vol::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--white) var(--level), rgba(255, 255, 255, .2) var(--level));
}
.vol::-moz-range-track {
  height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--white) var(--level), rgba(255, 255, 255, .2) var(--level));
}
.vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%; border: 0; background: var(--white); margin-top: -4px;
}
.vol::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; border: 0; background: var(--white); }

/* Geschwindigkeitsmenü */
.speed-wrap { position: relative; }
.speed-btn { font: 700 13px Inter, sans-serif; padding: 0 10px; }
.speed-menu {
  position: absolute; right: 0; bottom: 48px; z-index: 5;
  background: rgba(16, 30, 52, .97); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px; padding: 6px; min-width: 96px;
  box-shadow: var(--shadow-lg);
}
.speed-menu button {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: transparent; color: var(--white);
  font: 500 13px Inter, sans-serif; padding: 8px 12px; border-radius: 8px;
}
.speed-menu button:hover { background: rgba(255, 255, 255, .1); }
.speed-menu button.is-active { background: var(--primary); font-weight: 700; }

/* Untertitel */
video::cue { background: rgba(10, 22, 40, .85); color: var(--white); font-family: Inter, sans-serif; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--dark); color: var(--white);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 12px 22px; border-radius: 999px;
  font: 600 14px Inter, sans-serif; box-shadow: var(--shadow-lg);
  z-index: 200; max-width: 90vw; text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .header-inner { height: 60px; }
  .nav-link { display: none; }
  .hero-inner { padding: 56px 24px 48px; }
  .hero-stats { gap: 10px; }
  .stat-card { min-width: calc(50% - 5px); flex: 1; padding: 14px 16px; }
  .section-light { padding: 48px 0 64px; }
  .video-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 24px 24px; }

  .player-dialog { width: 100vw; }
  .player-shell { border-radius: 0; }
  .player-topbar { padding: 10px 12px; }
  .time { font-size: .75rem; }
  .big-play { width: 66px; height: 66px; }
}

@media (pointer: coarse) {
  .vol { display: none; }
  .player-stage.is-idle .player-controls { opacity: 1; pointer-events: auto; }
  .player-stage.is-idle { cursor: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
