:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0f172a;
  --panel: #111c31;
  --panel-light: #ffffff;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-dark: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.30);
  --radius: 22px;
}

* {
  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, #f8fafc 0%, #eef2f7 42%, #ffffff 100%);
  color: #172033;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(16px);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-copy strong {
  display: block;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.brand-copy small {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
}

.nav-more {
  border: 0;
  background: transparent;
  padding: 0;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  width: 310px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-nav a {
  color: #dbeafe;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover,
.mobile-nav a:hover {
  background: rgba(16, 185, 129, 0.16);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
  color: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(16, 185, 129, 0.34), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 64px;
  height: 100%;
  color: #ffffff;
}

.hero-copy {
  max-width: 690px;
}

.hero-tags,
.card-meta,
.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #ffffff;
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.32);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  display: block;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.42);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

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

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-head h2,
.search-copy h2,
.ranking-panel h2,
.story-card h2,
.category-overview-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.section-head p,
.search-copy p,
.category-overview-head p {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted-dark);
}

.section-link {
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.search-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 0.8fr);
  gap: 24px;
  align-items: center;
  margin-top: -46px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 12px;
}

.search-controls.single-control {
  grid-template-columns: 1fr;
}

.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  padding: 0 15px;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.empty-state {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  color: #b91c1c;
  font-weight: 700;
}

.empty-state.show {
  display: block;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.movie-card.featured .poster-frame,
.movie-card.ranked .poster-frame {
  aspect-ratio: 16 / 10;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.72));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-content strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: auto;
}

.card-meta em {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

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

.category-tile,
.category-overview-card,
.story-card,
.ranking-panel {
  display: block;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 190px;
  padding: 24px;
  background:
    radial-gradient(circle at 88% 10%, rgba(16, 185, 129, 0.18), transparent 32%),
    #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.13);
}

.category-tile strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  margin-bottom: 8px;
}

.category-tile p,
.story-card p,
.detail-one-line {
  color: var(--muted-dark);
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-preview span {
  max-width: 150px;
  overflow: hidden;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-panel {
  padding: 24px;
  align-self: start;
}

.compact-list,
.compact-grid {
  display: grid;
  gap: 13px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

.compact-card img {
  width: 64px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted-dark);
}

.rank-num {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #ef4444);
  color: #ffffff;
  font-weight: 900;
}

.compact-card:has(.rank-num) {
  grid-template-columns: 30px 58px 1fr;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.30), transparent 34%),
    linear-gradient(135deg, #020617, #0f172a 58%, #0f766e);
  color: #ffffff;
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.category-overview-card {
  padding: 24px;
}

.mini-list {
  margin: 20px 0;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.sticky-panel {
  position: sticky;
  top: 98px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 80px;
  background: #020617;
  color: #ffffff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(16, 185, 129, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.72), #020617);
}

.detail-shell {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #a7f3d0;
}

.breadcrumb a::after {
  content: "/";
  color: #64748b;
  margin-left: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-card.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.35);
  font-size: 34px;
  text-indent: 5px;
}

.play-overlay strong {
  font-size: 18px;
}

.detail-info h1 {
  margin: 18px 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.06;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
}

.detail-meta {
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
  font-size: 14px;
}

.detail-meta a {
  color: #a7f3d0;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.story-card {
  padding: 28px;
}

.story-card p {
  margin: 16px 0 0;
  font-size: 16px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
}

.footer-logo {
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #ffffff;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .featured-grid,
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-section,
  .ranking-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-slider {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    gap: 0;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .detail-content,
  .footer-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 560px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .search-panel {
    padding: 20px;
  }

  .featured-grid,
  .movie-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .compact-card:has(.rank-num) {
    grid-template-columns: 30px 58px 1fr;
  }

  .section-head {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }
}
