:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --bg-soft: #eef8fb;
  --panel: #ffffff;
  --panel-strong: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --brand: #06b6d4;
  --brand-dark: #2563eb;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-strong: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #22d3ee;
}

.site-search-form {
  width: 260px;
  height: 42px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.72);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 8px 0 16px;
}

.site-search-form input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.site-search-form button {
  width: 46px;
  height: 42px;
  border: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
}

.site-search-form button:hover {
  color: #22d3ee;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-links,
.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-links a,
.mobile-category-links a {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.mobile-category-links {
  margin-top: 12px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 1180px;
}

.hero-content h1,
.hero-content h2 {
  width: min(720px, 100%);
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-content h1 + h2 {
  margin-top: -6px;
  font-size: clamp(28px, 4vw, 48px);
  color: #cffafe;
}

.hero-content p {
  width: min(640px, 100%);
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.hero-badge,
.inline-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #ffffff;
  padding: 9px 16px;
  font-weight: 750;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta {
  color: #cbd5e1;
  margin-bottom: 30px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
  border-color: var(--line);
}

.primary-button.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.content-section,
.page-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 64px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link,
.tile-link {
  color: #0891b2;
  font-weight: 800;
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.featured-grid,
.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.standard-card,
.horizontal-card,
.overview-tile,
.category-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.standard-card:hover,
.horizontal-card:hover,
.overview-tile:hover,
.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(6, 182, 212, 0.36);
}

.card-cover,
.large-cover,
.horizontal-cover,
.overview-posters {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #164e63, #1d4ed8);
}

.card-cover {
  aspect-ratio: 3 / 4;
}

.card-cover img,
.large-cover img,
.horizontal-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.standard-card:hover img,
.large-card:hover img,
.horizontal-card:hover img {
  transform: scale(1.08);
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(248, 113, 113, 0.94);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 40px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.38);
  transition: opacity 0.25s ease;
}

.standard-card:hover .play-mark,
.large-card:hover .play-mark,
.horizontal-card:hover .play-mark {
  opacity: 1;
}

.card-body,
.horizontal-body,
.overview-body {
  padding: 18px;
}

.card-body h3,
.horizontal-body h3,
.large-card-text h3,
.overview-body h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
  color: var(--text);
}

.card-body h3,
.card-body p,
.horizontal-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h3 {
  -webkit-line-clamp: 2;
}

.card-body p,
.horizontal-body p,
.large-card-text p,
.overview-body p,
.category-tile p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.card-body p,
.horizontal-body p {
  -webkit-line-clamp: 2;
}

.card-body h3 a:hover,
.horizontal-body h3 a:hover,
.overview-body h2 a:hover,
.category-tile h3 a:hover {
  color: #0891b2;
}

.large-card {
  position: relative;
  min-height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.large-cover {
  height: 100%;
  min-height: 460px;
  color: #ffffff;
}

.large-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.04));
}

.large-card-text {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
}

.large-card-text h3,
.large-card-text p {
  color: #ffffff;
}

.large-card-text .card-meta {
  color: #cbd5e1;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 135px;
}

.horizontal-cover {
  height: 100%;
}

.horizontal-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.chip,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ranking-layout,
.latest-layout,
.ranking-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.category-band {
  width: min(1280px, calc(100% - 32px));
  padding: 52px 24px;
  margin-top: 64px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.92), rgba(207, 250, 254, 0.55));
}

@media (prefers-color-scheme: dark) {
  .category-band {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.86));
  }
}

.category-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.category-tile {
  padding: 22px;
}

.category-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  margin-bottom: 16px;
}

.category-mini-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.category-mini-list a {
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-mini-list a:hover {
  color: #0891b2;
}

.recommendation-box {
  padding: 44px;
  margin-top: 64px;
  border-radius: 32px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.page-main {
  padding: 34px 0 70px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.28), transparent 36%), linear-gradient(135deg, #0f172a, #1e3a8a 62%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  padding: 48px;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
  max-width: 760px;
}

.page-hero p {
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

.overview-tile {
  display: grid;
  grid-template-rows: auto 1fr;
}

.overview-posters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 170px;
}

.overview-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 24px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  outline: 0;
  color: var(--text);
  background: var(--panel-strong);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 24px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  padding: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  color: #ffffff;
  margin-bottom: 16px;
}

.detail-info .detail-meta {
  color: #cbd5e1;
  margin-bottom: 20px;
}

.detail-lead {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.player-section h2 {
  margin-bottom: 22px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-size: 38px;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.35);
}

.video-player.is-playing .player-overlay {
  display: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-copy article {
  padding: 28px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.detail-copy h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.detail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #cbd5e1;
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  gap: 24px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-inner p {
  margin: 0;
  max-width: 720px;
  line-height: 1.8;
}

.footer-nav,
.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-nav a,
.footer-categories a {
  color: #cbd5e1;
}

.footer-nav a:hover,
.footer-categories a:hover {
  color: #22d3ee;
}

.copyright {
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .site-search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .movie-grid,
  .library-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-layout,
  .latest-layout,
  .ranking-lead,
  .detail-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    padding: 0 18px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section {
    padding-top: 44px;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 10px;
  }

  .movie-grid,
  .library-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .horizontal-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .horizontal-cover {
    aspect-ratio: 16 / 9;
  }

  .page-hero,
  .detail-hero,
  .recommendation-box,
  .category-band {
    border-radius: 24px;
    padding: 28px 20px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .library-grid,
  .featured-grid,
  .compact-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 16px;
  }
}
