:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.10), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.header-inner {
  width: min(1260px, calc(100% - 28px));
  height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #475569, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 24px rgba(0, 0, 0, 0.24);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-style: normal;
  font-size: 12px;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(148, 163, 184, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(30, 41, 59, 0.76);
  cursor: pointer;
}

.global-search-box {
  position: relative;
  width: 230px;
}

.global-search {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.74);
  padding: 0 16px;
}

.global-search:focus {
  border-color: rgba(56, 189, 248, 0.58);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.10);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, 88vw);
  display: none;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 14px;
  color: white;
}

.search-result-item:hover {
  background: rgba(148, 163, 184, 0.12);
}

.search-result-item img {
  width: 54px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.search-result-item strong {
  display: block;
  font-size: 14px;
}

.search-result-item span {
  display: block;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
}

.hero-slider {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.28) 42%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  padding-top: 40px;
}

.hero-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  max-width: 820px;
  color: white;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

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

.tag-row span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.10);
  font-size: 12px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #020617;
  background: white;
  box-shadow: 0 18px 30px rgba(255, 255, 255, 0.13);
}

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

.ghost-btn {
  color: white;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.64);
}

.text-link {
  min-height: 0;
  padding: 0;
  color: var(--accent);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.content-section:last-of-type {
  padding-bottom: 76px;
}

.section-panel {
  margin-top: 76px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 8px 0 0;
  color: white;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 900;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(30, 41, 59, 0.82);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.055);
  filter: saturate(1.12);
}

.poster-badge,
.rank-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.rank-mark {
  left: auto;
  right: 12px;
  background: rgba(239, 68, 68, 0.86);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-title {
  display: -webkit-box;
  min-height: 48px;
  color: white;
  font-weight: 850;
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-meta {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 13px;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 62px;
  margin: 12px 0 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: stretch;
}

.movie-card-horizontal .poster-wrap img {
  height: 100%;
  min-height: 196px;
}

.movie-card-horizontal .movie-card-title {
  min-height: 0;
}

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

.category-card,
.category-wide-card,
.story-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
}

.category-card {
  overflow: hidden;
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.category-card > span,
.category-wide-card .section-kicker {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.category-card h3,
.category-wide-card h2 {
  margin: 8px 0 10px;
  color: white;
  font-size: 24px;
}

.category-card p,
.category-wide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-wide-list {
  display: grid;
  gap: 22px;
}

.category-wide-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 20px;
}

.category-wide-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-wide-preview img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.category-wide-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.category-wide-card li a:hover {
  color: white;
}

.page-hero {
  position: relative;
  margin-top: 34px;
  padding: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.18), transparent 24rem),
    radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.14), transparent 22rem),
    rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.page-hero p:not(.hero-kicker) {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.62);
  padding: 0 12px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(56, 189, 248, 0.56);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.10);
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.58);
}

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

.section-more {
  margin-top: 26px;
  text-align: center;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.30)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.28));
}

.detail-hero-inner {
  position: relative;
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 42px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  max-width: 820px;
  margin: 24px 0 20px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.72;
}

.detail-tags {
  margin-bottom: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background: black;
  box-shadow: var(--shadow);
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 0;
  color: white;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28)),
    radial-gradient(circle at center, rgba(56, 189, 248, 0.20), transparent 22rem);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-symbol {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #020617;
  background: white;
  font-size: 34px;
  box-shadow: 0 22px 50px rgba(255, 255, 255, 0.16);
}

.player-overlay strong {
  max-width: min(90%, 680px);
  font-size: clamp(22px, 3vw, 36px);
  text-align: center;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: 28px;
  padding: 42px 0;
  color: var(--subtle);
}

.footer-inner h2 {
  margin: 0 0 8px;
  color: white;
}

.footer-inner p {
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.footer-links a:hover {
  color: white;
  border-color: var(--line-strong);
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 1050px) {
  .global-search-box {
    width: 190px;
  }

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

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

  .detail-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    width: 100%;
    order: 4;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    padding-top: 10px;
  }

  .main-nav.is-open {
    display: grid;
  }

  .global-search-box {
    width: 100%;
    order: 5;
  }

  .hero-slider {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    min-height: 620px;
  }

  .section-panel {
    padding: 24px;
  }

  .movie-grid,
  .horizontal-grid,
  .ranking-grid,
  .ranking-list,
  .article-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .category-wide-card,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 580px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero-meta span {
    min-height: 28px;
    font-size: 12px;
  }

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

  .page-hero {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .section-heading {
    align-items: start;
  }

  .section-line {
    display: none;
  }

  .movie-grid,
  .horizontal-grid,
  .ranking-grid,
  .ranking-list,
  .category-grid,
  .article-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 120px 1fr;
  }

  .movie-card-horizontal .poster-wrap img {
    min-height: 178px;
  }

  .category-wide-preview {
    grid-template-columns: repeat(4, 1fr);
  }

  .story-card {
    padding: 22px;
  }

  .play-symbol {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
