/* ===========================================================
   OVRWushu Video Library — Design System v2.0
   Premium martial arts academy portal
   Standalone (no WordPress)
   =========================================================== */

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&family=Noto+Sans+TC:wght@400;500&display=swap');

/* === Design Tokens === */
:root {
  /* Brand palette */
  --brand-bg: #F7F3ED;
  --brand-bg-dark: #EDE7DD;
  --brand-accent: #D35400;
  --brand-accent-dark: #b74400;
  --brand-accent-light: rgba(211, 84, 0, 0.1);
  --brand-text: #222;
  --brand-gray: #555;
  --brand-gray-light: #999;
  --brand-border: #e8e4de;
  --brand-white: #fff;
  --brand-error: #c0392b;
  --brand-error-bg: #fdf0ef;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows — layered for depth */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Fonts */
  --font-he: 'Assistant', sans-serif;
  --font-zh: 'Noto Sans TC', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-xxl: 60px;
}

/* === Base Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Base Body === */
body.ovr-login-page,
body.ovr-library-page {
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-he);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Focus-visible (accessibility) === */
:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ===========================================================
   UTILITY CLASSES
   =========================================================== */

/* Fade in + slide up */
.fade-in {
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  animation: fadeSlideUp 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.1s);
}

/* Shake animation for errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Skeleton shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Pulsing dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Pill badge */
.pill-badge {
  display: inline-block;
  background: var(--brand-accent);
  color: var(--brand-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--brand-accent);
  color: var(--brand-white);
  font-family: var(--font-he);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-primary:hover {
  background: var(--brand-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* === Custom Scrollbar === */
.playlist__list {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-accent) transparent;
}

.playlist__list::-webkit-scrollbar {
  width: 6px;
}

.playlist__list::-webkit-scrollbar-track {
  background: transparent;
}

.playlist__list::-webkit-scrollbar-thumb {
  background: var(--brand-accent);
  border-radius: var(--radius-full);
}

.playlist__list::-webkit-scrollbar-thumb:hover {
  background: var(--brand-accent-dark);
}

/* ===========================================================
   SITE LOGO
   =========================================================== */

.site-logo {
  max-width: 160px;
  height: auto;
}

@media (max-width: 480px) {
  .site-logo {
    max-width: 120px;
  }
}

/* ===========================================================
   LOGIN PAGE
   =========================================================== */

.login-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: linear-gradient(160deg, #F7F3ED 0%, #EDE7DD 50%, #E5DFD5 100%);
  /* Subtle CSS-only texture */
  background-image:
    linear-gradient(160deg, #F7F3ED 0%, #EDE7DD 50%, #E5DFD5 100%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(0, 0, 0, 0.008) 20px,
      rgba(0, 0, 0, 0.008) 21px
    );
}

.login-card {
  background: var(--brand-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  animation: fadeSlideUp 0.6s ease forwards;
}

.login-card--error {
  animation: fadeSlideUp 0.6s ease forwards, shake 0.5s ease 0.1s;
}

/* Logo in login */
.login-logo {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.login-logo img {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Welcome text */
.login-title {
  text-align: center;
  font-family: var(--font-he);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--brand-text);
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  text-align: center;
  font-family: var(--font-he);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--brand-accent);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.03em;
}

/* Error message */
.login-error {
  background: var(--brand-error-bg);
  color: var(--brand-error);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  text-align: center;
}

/* Form fields with floating labels */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-field {
  position: relative;
}

.form-field input {
  width: 100%;
  height: 52px;
  padding: 22px 16px 8px;
  font-family: var(--font-he);
  font-size: 1rem;
  color: var(--brand-text);
  background: var(--brand-bg);
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-field input:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent-light);
}

/* Floating label */
.form-field label {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-family: var(--font-he);
  font-size: 1rem;
  color: var(--brand-gray-light);
  pointer-events: none;
  transition: all var(--transition-fast);
  transform-origin: right top;
}

/* Label floats up when input is focused or has value */
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label {
  top: 10px;
  transform: translateY(0);
  font-size: 0.75rem;
  color: var(--brand-accent);
  font-weight: 600;
}

/* LTR inputs: move label to left side */
.form-field input[dir="ltr"] + label {
  right: auto;
  left: 16px;
  transform-origin: left top;
}

.form-field input[dir="ltr"]:focus + label,
.form-field input[dir="ltr"]:not(:placeholder-shown) + label {
  left: 16px;
  right: auto;
}

/* Hint text */
.form-field__hint {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-gray-light);
  margin-top: var(--space-xs);
  padding-right: 4px;
  direction: ltr;
  text-align: left;
}

/* Submit button */
.login-submit {
  width: 100%;
  height: 52px;
  font-size: 1.1rem;
  margin-top: var(--space-sm);
}

/* Footer */
.login-footer {
  margin-top: var(--space-xl);
  font-size: 0.85rem;
  color: var(--brand-gray-light);
  text-align: center;
}

/* Mobile login */
@media (max-width: 480px) {
  .login-viewport {
    padding: var(--space-md);
  }

  .login-card {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
  }

  .login-title {
    font-size: 1.5rem;
  }
}

/* ===========================================================
   LIBRARY HOMEPAGE
   =========================================================== */

.library-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) var(--space-xxl);
}

/* Header area */
.library-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.library-header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  direction: rtl;
}

.library-greeting {
  font-size: 1rem;
  font-weight: 400;
  color: var(--brand-gray);
}

.logout-link {
  font-size: 0.9rem;
  color: var(--brand-gray-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.logout-link:hover {
  color: var(--brand-accent);
}

.library-title {
  font-family: var(--font-he);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--brand-text);
  margin-bottom: var(--space-sm);
}

.library-title__accent {
  width: 60px;
  height: 3px;
  background: var(--brand-accent);
  border-radius: var(--radius-full);
  margin: 0 auto;
}

/* Section headers */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-he);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--brand-text);
  text-align: right;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title__line {
  flex: 1;
  height: 1px;
  background: var(--brand-border);
  margin-right: var(--space-md);
}

/* Collection section */
.collection-section {
  margin-bottom: var(--space-xl);
}

/* Collection grid */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Collection cards */
.collection-card {
  display: flex;
  flex-direction: column;
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid transparent;
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              border-color var(--transition-normal);
}

.collection-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--brand-accent);
}

.collection-card .pill-badge {
  align-self: flex-start;
  margin-bottom: var(--space-md);
}

.collection-card__title {
  font-family: var(--font-he);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand-text);
  margin-bottom: var(--space-xs);
  text-align: right;
}

.collection-card__zh {
  font-family: var(--font-zh);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--brand-gray);
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
  text-align: right;
}

.collection-card__desc {
  font-size: 0.9rem;
  color: var(--brand-gray);
  line-height: 1.6;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.collection-card__count {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-gray-light);
  margin-top: var(--space-md);
  text-align: right;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.empty-state__icon {
  color: var(--brand-gray-light);
  margin-bottom: var(--space-lg);
}

.empty-state__text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-gray);
  margin-bottom: var(--space-sm);
}

.empty-state__subtext {
  font-size: 0.95rem;
  color: var(--brand-gray-light);
}

/* Live classes section */
.live-classes-section {
  background: #faf5ef;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #e74c3c;
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}

.live-classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.live-class-card {
  background: var(--brand-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.live-class-time {
  font-size: 0.85rem;
  color: var(--brand-gray-light);
  font-weight: 600;
}

.live-class-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-text);
  margin: var(--space-xs) 0 var(--space-sm);
}

/* Mobile homepage */
@media (max-width: 700px) {
  .library-main {
    padding: var(--space-md) var(--space-md) var(--space-xl);
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   SERIES / PLAYER PAGE
   =========================================================== */

/* Series header */
.series-header {
  margin-bottom: var(--space-lg);
}

.back-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-text);
  background: var(--brand-white);
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-fast),
              box-shadow var(--transition-fast),
              color var(--transition-fast);
  margin-bottom: var(--space-lg);
}

.back-pill:hover {
  background: var(--brand-accent);
  color: var(--brand-white);
  box-shadow: var(--shadow-md);
}

.back-pill svg {
  transition: stroke var(--transition-fast);
}

.back-pill:hover svg {
  stroke: var(--brand-white);
}

.series-title {
  font-family: var(--font-he);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--brand-text);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.series-title__zh {
  font-family: var(--font-zh);
  font-weight: 400;
  font-size: 1rem;
  color: var(--brand-gray);
  display: block;
  margin-top: var(--space-xs);
  letter-spacing: 1px;
}

.series-desc {
  text-align: center;
  font-size: 1rem;
  color: var(--brand-gray);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Video layout */
.video-layout {
  display: flex;
  flex-direction: row-reverse; /* RTL: playlist on right */
  gap: var(--space-lg);
  align-items: flex-start;
}

/* Player */
.video-player {
  flex: 7;
  min-width: 0;
}

.video-player__container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  /* 9:16 portrait default — will be overridden if landscape */
  aspect-ratio: 9 / 16;
}

.video-player__container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Skeleton shimmer overlay */
.video-player__skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  z-index: 1;
}

/* Playlist */
.playlist {
  flex: 3;
  min-width: 240px;
  max-height: 720px;
  background: var(--brand-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.playlist__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--brand-border);
}

.playlist__count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-gray);
}

.playlist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.playlist__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px var(--space-lg);
  cursor: pointer;
  border-bottom: 1px solid var(--brand-border);
  transition: background var(--transition-fast),
              color var(--transition-fast);
  position: relative;
}

.playlist__item:last-child {
  border-bottom: none;
}

.playlist__item:hover {
  background: var(--brand-bg);
}

.playlist__item--active {
  background: var(--brand-accent);
  color: var(--brand-white);
  border-right: 3px solid var(--brand-accent-dark);
}

.playlist__item--active:hover {
  background: var(--brand-accent);
}

.playlist__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--brand-accent-light);
  color: var(--brand-accent);
}

.playlist__item--active .playlist__number {
  background: rgba(255, 255, 255, 0.2);
  color: var(--brand-white);
}

.playlist__video-title {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

.playlist__playing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-white);
  animation: pulse 1.5s ease infinite;
  flex-shrink: 0;
}

/* Access denied page */
.access-denied {
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.access-denied__icon {
  color: var(--brand-gray-light);
  margin-bottom: var(--space-lg);
}

.access-denied__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-text);
  margin-bottom: var(--space-sm);
}

.access-denied__text {
  font-size: 1rem;
  color: var(--brand-gray);
  margin-bottom: var(--space-xl);
}

/* Mobile series layout */
@media (max-width: 900px) {
  .video-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .video-player {
    flex: none;
  }

  .video-player__container {
    aspect-ratio: 9 / 16;
    max-height: 70vh;
  }

  .playlist {
    flex: none;
    max-height: none;
    min-width: unset;
  }
}

/* ===========================================================
   LOGO: LIGHT/DARK SWAP
   =========================================================== */

/* Light mode: show dark logo, hide light logo */
.logo-light { display: inline; }
.logo-dark { display: none; }

/* Dark mode (OS or explicit): show light logo, hide dark logo */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .logo-light { display: none; }
  html:not([data-theme="light"]) .logo-dark { display: inline; }
}
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: inline; }

/* Explicit light override */
[data-theme="light"] .logo-light { display: inline; }
[data-theme="light"] .logo-dark { display: none; }

/* ===========================================================
   ACCESSIBILITY
   =========================================================== */

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
  }

  .stagger-children > * {
    opacity: 1;
  }
}

/* ===========================================================
   PRINT
   =========================================================== */

@media print {
  .library-header__top,
  .back-pill,
  .playlist,
  .login-viewport,
  .logout-link {
    display: none !important;
  }

  .video-player__container {
    box-shadow: none;
  }

  body {
    background: #fff !important;
  }
}

/* ===========================================================
   DARK MODE (optional enhancement)
   =========================================================== */

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brand-border);
  background: var(--brand-white);
  color: var(--brand-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  z-index: 100;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--brand-accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Dark icon hidden in light mode, shown in dark */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Dark mode via data attribute (user toggle) or OS preference (default) */
/* OS dark preference — applies unless user explicitly chose light */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .login-viewport {
    background: linear-gradient(160deg, #1a1714 0%, #151210 50%, #0f0d0a 100%);
  }
  html:not([data-theme="light"]) .live-classes-section { background: #211e1a; }
  html:not([data-theme="light"]) .playlist__item--active { background: var(--brand-accent); color: #fff; }
  html:not([data-theme="light"]) .pill-badge { color: #fff; }
  html:not([data-theme="light"]) .btn-primary { color: #fff; }
  html:not([data-theme="light"]) .login-error { background: rgba(231, 76, 60, 0.15); }
  html:not([data-theme="light"]) .form-field input { color: var(--brand-text); }
}

/* Dark palette — shared by OS preference and explicit toggle */
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) {
  --brand-bg: #1a1714; --brand-bg-dark: #151210; --brand-accent: #e8711a; --brand-accent-dark: #d35400;
  --brand-accent-light: rgba(232, 113, 26, 0.15); --brand-text: #e8e4de; --brand-gray: #aaa; --brand-gray-light: #777;
  --brand-border: #2d2a26; --brand-white: #222018; --brand-error: #e74c3c; --brand-error-bg: rgba(231, 76, 60, 0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2); --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4); --shadow-xl: 0 12px 40px rgba(0,0,0,0.5);
} }

/* Explicit dark mode toggle (overrides OS preference) */
[data-theme="dark"] {
  --brand-bg: #1a1714;
  --brand-bg-dark: #151210;
  --brand-accent: #e8711a;
  --brand-accent-dark: #d35400;
  --brand-accent-light: rgba(232, 113, 26, 0.15);
  --brand-text: #e8e4de;
  --brand-gray: #aaa;
  --brand-gray-light: #777;
  --brand-border: #2d2a26;
  --brand-white: #222018;
  --brand-error: #e74c3c;
  --brand-error-bg: rgba(231, 76, 60, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .login-viewport {
  background: linear-gradient(160deg, #1a1714 0%, #151210 50%, #0f0d0a 100%);
  background-image:
    linear-gradient(160deg, #1a1714 0%, #151210 50%, #0f0d0a 100%),
    repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.01) 20px, rgba(255, 255, 255, 0.01) 21px);
}

[data-theme="dark"] .live-classes-section { background: #211e1a; }
[data-theme="dark"] .playlist__item--active { background: var(--brand-accent); color: #fff; }
[data-theme="dark"] .pill-badge { color: #fff; }
[data-theme="dark"] .btn-primary { color: #fff; }
[data-theme="dark"] .login-error { background: rgba(231, 76, 60, 0.15); }
[data-theme="dark"] .form-field input { color: var(--brand-text); }
