/* ============================================
   AsilMedia v2 — Design Tokens (Green Theme)
   ============================================ */

:root {
  /* Color palette — Dark cinema + Green accent */
  --bg-primary: #0d1117;
  --bg-secondary: #141c24;
  --bg-tertiary: #1a2332;
  --bg-hover: #1f2d3d;
  --bg-glass: rgba(13, 17, 23, 0.85);
  --bg-glass-light: rgba(13, 17, 23, 0.5);
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --bg-sidebar: #0b0f14;
  --bg-card: #141c24;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #545d68;
  --text-inverse: #0d1117;

  --accent: #3fb950;
  --accent-hover: #2ea043;
  --accent-light: #56d364;
  --accent-dark: #238636;
  --accent-glow: rgba(63, 185, 80, 0.15);
  --accent-glow-strong: rgba(63, 185, 80, 0.3);

  --success: #3fb950;
  --danger: #f85149;
  --warning: #d29922;
  --info: #58a6ff;
  --gold: #e3b341;

  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --border-accent: rgba(63, 185, 80, 0.4);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --fs-xs: 0.6875rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Layout */
  --sidebar-width: 220px;
  --header-height: 56px;
  --container-max: 1400px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(63, 185, 80, 0.3);

  /* Transitions */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ============================================
   Light Theme Overrides
   ============================================ */
[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e4e8ed;
  --bg-hover: #d5dbe3;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-light: rgba(255, 255, 255, 0.6);
  --bg-overlay: rgba(0, 0, 0, 0.45);
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;

  --text-primary: #1a1e24;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-inverse: #ffffff;

  --accent: #2ea043;
  --accent-hover: #238636;
  --accent-light: #3fb950;
  --accent-dark: #1a7f37;
  --accent-glow: rgba(46, 160, 67, 0.1);
  --accent-glow-strong: rgba(46, 160, 67, 0.2);

  --border: rgba(0, 0, 0, 0.12);
  --border-light: rgba(0, 0, 0, 0.06);
  --border-accent: rgba(46, 160, 67, 0.4);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(46, 160, 67, 0.2);

  /* Light theme specific — banner gradient helper */
  --banner-gradient-mid: rgba(0, 0, 0, 0.15);
}

/* Light theme component overrides */
[data-theme="light"] .sidebar {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .top-bar {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .genre-item__icon {
  background: #dce3eb;
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .genre-item__icon .icon {
  color: var(--text-secondary);
}

[data-theme="light"] .genre-item:hover .genre-item__icon {
  background: rgba(46, 160, 67, 0.15);
  border-color: var(--accent);
}

[data-theme="light"] .genre-item:hover .genre-item__icon .icon {
  color: var(--accent);
}

[data-theme="light"] .year-filter__item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

[data-theme="light"] .carousel-arrow {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .top-bar__search-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .top-bar__search-btn {
  background: var(--bg-tertiary);
}

[data-theme="light"] .seo-text {
  color: var(--text-secondary);
}

[data-theme="light"] .site-footer {
  background: #ffffff;
}

[data-theme="light"] .carousel-view-all {
  background: #f0f2f5;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .fs-banner__gradient {
  background: linear-gradient(to top, var(--bg-primary) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
}

[data-theme="light"] .pagination a,
[data-theme="light"] .pagination span {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .tag {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .alert {
  background: #ffffff;
}

[data-theme="light"] .profile__header {
  background: #ffffff;
}

[data-theme="light"] .vote-widget {
  background: #ffffff;
}

[data-theme="light"] .filter-overlay {
  background: #ffffff;
}

[data-theme="light"] .mobile-bar {
  background: rgba(255, 255, 255, 0.95);
}

/* Fullstory specific */
[data-theme="light"] .fs-episodes {
  background: #ffffff;
}

[data-theme="light"] .fs-episodes__season-tab {
  background: #ffffff;
}

[data-theme="light"] .fs-episodes__item {
  background: #ffffff;
}

[data-theme="light"] .qp-modal {
  background: #ffffff;
}

[data-theme="light"] .qp-option {
  background: #f0f2f5;
}

[data-theme="light"] .fs-info__row-value a {
  color: var(--accent);
}

[data-theme="light"] .fs-download {
  background: #ffffff;
}

[data-theme="light"] .fs-dl-item {
  background: #f0f2f5;
}

/* Comments */
[data-theme="light"] .comment {
  background: #ffffff;
}

[data-theme="light"] .comment__reply-form {
  background: #f0f2f5;
}

/* Swiper pagination dots */
[data-theme="light"] .hero-slider .swiper-pagination-bullet {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .hero-slider .swiper-pagination-bullet-active {
  background: var(--accent);
}

/* Comment form */
[data-theme="light"] .comment-form {
  background: #ffffff;
}

[data-theme="light"] .comment-form__textarea {
  background: #f0f2f5;
}

/* Engine overrides */
[data-theme="light"] .ui-dialog {
  background: #ffffff;
}

/* Scrollbar for light mode */
[data-theme="light"] * {
  scrollbar-color: #c1c8d0 #f0f2f5;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f0f2f5;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c1c8d0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #a0a8b4;
}
