  /* Light mode */
  [data-theme="light"] {
    --bg: #f1f5f9;
    --bg2: #e2e8f0;
    --text: #0f172a;
    --text-dim: #475569;
    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --border: #cbd5e1;
    --card-bg: #ffffff;
  }

  /* styles */
  .main {
    margin-top: 70px;
    padding: 20px 24px 60px;
    text-align: center;
    transition: 0.3s;
  }

  body.movies-open .main {
    display: none;
  }

  .title {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(145deg, #e2e8ff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
  }

  [data-theme="light"] .title {
    background: linear-gradient(145deg, #4f46e5, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .ad-top {
    width: min(728px, 90%);
    height: 90px;
    margin: 18px auto;
    background: var(--card-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text-dim);
  }

  .movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
    max-width: 1100px;
    margin: 40px auto 0;
    padding: 0 12px;
  }

  .movie-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 28px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
    color: var(--text);
  }

  .movie-card:hover {
    transform: translateY(-8px);
    background: var(--accent);
    border-color: var(--accent);
  }

  .movie-card:hover .movie-icon,
  .movie-card:hover h3,
  .movie-card:hover p {
    color: white;
  }

  .movie-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--accent);
  }

  .movie-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .movie-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
  }

  /* Viewer - below both browser bar and navbar */
  .viewer {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
  }

  [data-theme="light"] .viewer {
    background: rgba(255, 255, 255, 0.9);
  }

  .viewer.active {
    display: flex;
  }

  .viewer-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    height: 90%;
    gap: 18px;
  }

  .ad-left, .ad-right {
    width: 160px;
    height: 300px;
    background: var(--card-bg);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-dim);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
  }

  .movies-box {
    flex: 1;
    max-width: 1100px;
    height: 100%;
    background: var(--card-bg);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 40px -12px black;
  }

  .movies-area {
    flex: 1;
    overflow: hidden;
  }

  #movieFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
  }

  .controls {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  [data-theme="light"] .controls {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid var(--border);
  }

  .ctrl-btn {
    background: #1e293b;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
  }

  [data-theme="light"] .ctrl-btn {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
  }

  .ctrl-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    color: white;
  }

  /* Loader */
  #loader {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, #020617, #000000dd);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(12px);
  }

  [data-theme="light"] #loader {
    background: rgba(255, 255, 255, 0.95);
  }

  #loader.active {
    opacity: 1;
    pointer-events: all;
  }

  .loader-content {
    text-align: center;
  }

  #loaderIcon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.8rem;
    animation: floatIcon 2s ease-in-out infinite;
    box-shadow: 0 0 32px rgba(99,102,241,0.7);
  }

  @keyframes floatIcon {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  #loaderTitle {
    margin-top: 18px;
    font-size: 1.7rem;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  [data-theme="light"] #loaderTitle {
    -webkit-text-fill-color: var(--accent);
  }

  #loaderText {
    margin-top: 8px;
    color: #94a3b8;
  }

  [data-theme="light"] #loaderText {
    color: var(--text-dim);
  }

  .progress {
    width: 240px;
    height: 6px;
    background: #1e293b;
    border-radius: 20px;
    margin: 20px auto 0;
    overflow: hidden;
  }

  [data-theme="light"] .progress {
    background: var(--border);
  }

  .bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    transition: width 2.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  }
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
  @media (max-width: 860px) {
    .ad-left, .ad-right { display: none; }
    .controls { gap: 8px; }
    .ctrl-btn span { display: none; }
    .ctrl-btn i { margin: 0; font-size: 1.2rem; }
    .ctrl-btn { padding: 10px 12px; }
  }