:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #10b981;
  --primary-dark: #059669;
  --teal: #0d9488;
  --dark: #071a17;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.12), transparent 30%), var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.26);
}

.brand-text {
  background: linear-gradient(90deg, var(--primary-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link:hover {
  color: var(--primary-dark);
}

.top-search {
  width: 230px;
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px;
}

.top-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: #0f172a;
}

.top-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  padding: 10px 14px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 20px;
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: #334155;
  font-weight: 700;
}

.mobile-panel .top-search {
  width: 100%;
  margin-top: 10px;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #071a17;
}

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

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

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

.hero-slide img.is-hidden {
  display: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(16, 185, 129, 0.35), transparent 24%), linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.72) 42%, rgba(3, 7, 18, 0.18));
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: 90px 0 120px;
}

.hero-content {
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

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

.hero p {
  margin: 18px 0 0;
  color: #d1fae5;
  font-size: clamp(17px, 2vw, 21px);
  max-width: 620px;
}

.hero-meta,
.meta-row,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #064e3b;
  background: #d1fae5;
  font-size: 14px;
  font-weight: 750;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.section {
  padding: 72px 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.6), rgba(248, 250, 252, 0));
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.86);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.35), transparent 30%), linear-gradient(135deg, #0f172a, #065f46);
}

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

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

.poster-frame img.is-hidden {
  display: none;
}

.movie-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-title {
  display: block;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  color: #0f172a;
}

.movie-card-title:hover {
  color: var(--primary-dark);
}

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

.meta-row {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.meta-row span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 9px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #0f766e);
  padding: 22px;
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -36px;
  top: -36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 24px;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: #d1fae5;
}

.breadcrumb {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.page-hero {
  padding: 64px 0 34px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 780px;
  font-size: 18px;
}

.panel {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.86);
  padding: 24px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 12px;
}

.rank-num {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  font-weight: 900;
}

.ranking-thumb {
  width: 96px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-thumb img.is-hidden {
  display: none;
}

.ranking-title {
  font-size: 18px;
  font-weight: 850;
}

.ranking-summary {
  margin: 6px 0 0;
  color: var(--muted);
}

.detail-hero {
  padding: 44px 0 40px;
  background: linear-gradient(135deg, #022c22, #0f172a);
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #047857);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-poster img.is-hidden {
  display: none;
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-content p {
  color: #d1fae5;
  font-size: 18px;
  margin: 16px 0 0;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.72));
}

.player-overlay.is-hidden {
  display: none;
}

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  padding: 16px 26px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.35);
}

.play-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-dark);
  background: #ffffff;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}

.article h2,
.sidebar h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article p {
  color: #334155;
  margin: 0 0 18px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-link {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.related-thumb {
  width: 62px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #065f46);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-thumb img.is-hidden {
  display: none;
}

.related-title {
  display: block;
  font-weight: 850;
}

.related-meta {
  color: var(--muted);
  font-size: 13px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  padding: 13px 14px;
  outline: 0;
}

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

.empty-state {
  display: none;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 38px;
  text-align: center;
  color: var(--muted);
}

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

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #0f172a;
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}

.footer-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

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

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .nav-wrap > .top-search {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-inner {
    min-height: 590px;
  }

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

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

  .detail-layout,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 80vw);
  }

  .ranking-item {
    grid-template-columns: 46px 74px 1fr;
  }

  .ranking-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand {
    font-size: 19px;
  }

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

  .hero-actions,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .section {
    padding: 50px 0;
  }
}
