:root {
  color-scheme: dark;
  --gold: #f5d58a;
  --gold-strong: #ffd978;
  --mint: #9ce2cf;
  --rose: #f5b7a4;
  --ink: #10211e;
  --panel: rgba(20, 38, 34, 0.58);
  --panel-strong: rgba(17, 31, 29, 0.74);
  --line: rgba(255, 222, 148, 0.34);
  --text: #fff7e8;
  --muted: rgba(255, 247, 232, 0.74);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(5, 20, 18, 0.42), rgba(7, 17, 17, 0.88)),
    url("../galeri/background/eltern_2.webp") center / cover fixed no-repeat;
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(245, 213, 138, 0.18), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(156, 226, 207, 0.14), transparent 26%),
    linear-gradient(90deg, rgba(6, 15, 14, 0.58), transparent 34%, rgba(6, 15, 14, 0.48));
  z-index: -2;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.light {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.22;
}

.light-one { left: -14vw; top: 8vh; background: #f3c56c; }
.light-two { right: -16vw; top: 28vh; background: #7fd6c6; }
.light-three { left: 34vw; bottom: -28vw; background: #f3a58d; opacity: 0.15; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(8, 20, 18, 0.84), rgba(8, 20, 18, 0.2));
  backdrop-filter: blur(16px);
}

.home-link,
.language-picker,
.ghost-button,
.primary-button,
.secondary-button,
.small-button {
  border: 1px solid var(--line);
  background: rgba(18, 34, 31, 0.58);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
}

.home-link img { width: 28px; height: 28px; object-fit: contain; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.language-picker select {
  color: var(--text);
  background: rgba(8, 20, 18, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 10px;
}

.ghost-button,
.primary-button,
.secondary-button,
.small-button {
  min-height: 44px;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.ghost-button { padding: 0 16px; }
.primary-button,
.secondary-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; }
.primary-button { background: linear-gradient(135deg, rgba(245, 213, 138, 0.92), rgba(238, 172, 102, 0.86)); color: #2a180c; }
.secondary-button { background: rgba(255, 255, 255, 0.1); }
.small-button { padding: 0 14px; min-height: 38px; color: var(--muted); cursor: default; }

.dashboard-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.video-card,
.glass-card,
.wide-panel,
.pro-panel,
.dialog-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
}

.hero-copy {
  border-radius: 22px;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
}

.eyebrow,
.card-kicker,
.section-heading span,
.video-heading span,
.pro-panel span {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  max-width: 680px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
  hyphens: auto;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.video-card {
  border-radius: 22px;
  padding: 18px;
}

.video-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 4px 4px 14px;
}

.video-heading p,
.written-note {
  color: var(--muted);
  line-height: 1.55;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.34);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.play-film {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(18, 34, 31, 0.72);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-weight: 900;
}

.written-note { margin: 14px 4px 0; }

.insight-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 0.7fr 1.3fr;
  gap: 16px;
  margin-top: 18px;
}

.glass-card {
  min-height: 180px;
  border-radius: 18px;
  padding: 20px;
}

.glass-card p,
.wide-panel p,
.pro-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.child-card h2 { color: var(--gold-strong); }

.metric-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 56px;
  line-height: 1;
  color: var(--mint);
}

.parent-post-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
}

.parent-post-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.35));
}

.panel-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  margin-top: 18px;
}

.wide-panel,
.pro-panel {
  border-radius: 22px;
  padding: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.learning-card {
  min-height: 182px;
  border: 1px solid rgba(255, 222, 148, 0.28);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, background 0.18s ease;
}

.learning-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
}

.learning-card span {
  color: var(--gold-strong);
  font-weight: 900;
  font-size: 18px;
}

.learning-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pro-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  background: rgba(29, 46, 39, 0.7);
}

.pro-panel p { max-width: 78ch; margin-bottom: 0; }

.name-dialog {
  width: min(520px, calc(100% - 28px));
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.name-dialog::backdrop {
  background: rgba(3, 10, 10, 0.72);
  backdrop-filter: blur(12px);
}

.dialog-card {
  border-radius: 24px;
  padding: 28px;
  text-align: center;
}

.dialog-card img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin-bottom: 10px;
}

.dialog-card input {
  width: 100%;
  min-height: 50px;
  margin: 12px 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

@media (max-width: 980px) {
  .hero,
  .panel-row,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy { min-height: auto; }
  .learning-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar {
    position: relative;
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .language-picker {
    width: 100%;
  }

  .language-picker {
    justify-content: space-between;
    border-radius: 18px;
  }

  .language-picker select { max-width: 54%; }
  .ghost-button { width: 100%; }
  .dashboard-shell { width: min(100% - 20px, 1180px); padding-top: 12px; }
  .hero-copy,
  .video-card,
  .wide-panel,
  .pro-panel,
  .glass-card { border-radius: 16px; }
  .hero-actions,
  .pro-panel { align-items: stretch; flex-direction: column; }
  h1 { font-size: clamp(24px, 8vw, 34px); }
  .primary-button,
  .secondary-button { width: 100%; }
  .video-heading { display: block; }
  .parent-post-card { grid-template-columns: 72px 1fr; }
  .parent-post-card img { width: 72px; height: 72px; }
}


.subtitle-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(255, 222, 148, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.subtitle-size-control select {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 20, 18, 0.78);
  color: var(--text);
  padding: 6px 9px;
}

video::cue {
  color: #fff9e8;
  background: rgba(8, 16, 16, 0.78);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  line-height: 1.28;
}

body[data-subtitle-size="small"] video::cue { font-size: 82%; }
body[data-subtitle-size="normal"] video::cue { font-size: 100%; }
body[data-subtitle-size="large"] video::cue { font-size: 124%; }

@media (max-width: 640px) {
  .subtitle-size-control {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }
}


.soroban-learning-card {
  border-color: rgba(107, 226, 187, 0.42);
  background: linear-gradient(145deg, rgba(62, 155, 128, 0.2), rgba(255, 255, 255, 0.08));
}

.soroban-learning-card:hover {
  background: linear-gradient(145deg, rgba(62, 155, 128, 0.3), rgba(255, 255, 255, 0.13));
}

.learning-card .learning-link {
  display: block;
  margin-top: 14px;
  color: #8aefd1;
  font-size: 14px;
  line-height: 1.35;
}
