:root {
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --cyan-600: #0891b2;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.1);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-700), var(--cyan-600));
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, var(--amber-500));
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text small {
  color: #ccfbf1;
  font-size: 12px;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.site-nav a {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fcd34d;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  min-width: 260px;
}

.top-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px 0 0 999px;
  padding: 9px 14px;
  backdrop-filter: blur(10px);
}

.top-search input::placeholder {
  color: #ccfbf1;
}

.top-search button {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: var(--amber-500);
  border-radius: 0 999px 999px 0;
  padding: 9px 16px;
  font-weight: 700;
}

.top-search button:hover {
  background: var(--amber-600);
}

.nav-toggle {
  display: none;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
  color: var(--white);
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 12px 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content strong {
  display: block;
  max-width: 620px;
  margin: 0 0 10px;
  color: #fde68a;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-badges span:first-child {
  background: var(--amber-500);
}

.hero-meta,
.detail-meta {
  color: #bae6fd;
  font-size: 18px;
  font-weight: 700;
}

.hero-text {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.28);
}

.btn-primary:hover {
  background: var(--teal-700);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  color: #0f172a;
  background: #fcd34d;
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--white);
  background: rgba(15, 23, 42, 0.44);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.active {
  width: 28px;
  background: var(--amber-500);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-head p {
  margin: 6px 0 0;
  color: #64748b;
}

.section-head a {
  color: var(--teal-700);
  font-weight: 800;
}

.highlight-grid,
.movie-grid,
.category-grid,
.overview-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

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

.movie-card-link:hover .poster-wrap img {
  transform: scale(1.07);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(13, 148, 136, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #451a03;
  background: #fbbf24;
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.movie-card-body strong {
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body small,
.movie-card-body em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.movie-card-summary {
  color: #475569;
  font-size: 14px;
}

.movie-card-summary.compact {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag-row span {
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  padding: 4px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 14px;
}

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  padding: 22px;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(8, 145, 178, 0.86));
}

.category-tile img {
  position: absolute;
  right: -20px;
  bottom: -30px;
  z-index: -2;
  width: 150px;
  height: 210px;
  object-fit: cover;
  border-radius: 22px;
  opacity: 0.36;
  transform: rotate(8deg);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 11px;
  font-weight: 800;
}

.category-tile strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.category-tile em {
  display: block;
  max-width: 210px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  font-size: 14px;
}

.category-blue::before {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-purple::before {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
}

.category-rose::before {
  background: linear-gradient(135deg, #e11d48, #f97316);
}

.category-amber::before {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.category-teal::before {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.category-indigo::before {
  background: linear-gradient(135deg, #4338ca, #0891b2);
}

.category-slate::before {
  background: linear-gradient(135deg, #0f172a, #475569);
}

.category-pink::before {
  background: linear-gradient(135deg, #db2777, #fb7185);
}

.category-orange::before {
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

.category-lime::before {
  background: linear-gradient(135deg, #65a30d, #0d9488);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 32px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius-lg);
  background: var(--slate-900);
  color: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.compact-head h2,
.ranking-panel .section-head h2 {
  color: var(--white);
  font-size: 24px;
}

.compact-head p,
.ranking-panel .section-head p {
  color: #94a3b8;
}

.ranking-panel .section-head a {
  color: #fcd34d;
}

.ranking-panel ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.ranking-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #451a03;
  background: #fbbf24;
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.ranking-item strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-item small {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
}

.inner-hero,
.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.72), transparent 36%), linear-gradient(135deg, var(--slate-900), var(--teal-900));
}

.inner-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.inner-hero span {
  display: inline-flex;
  border-radius: 999px;
  background: var(--amber-500);
  padding: 6px 14px;
  font-weight: 800;
}

.inner-hero h1 {
  max-width: 780px;
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-bottom: 28px;
}

.filter-panel label {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.overview-card a {
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.overview-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.overview-card span,
.overview-card h2,
.overview-card p {
  margin-left: 20px;
  margin-right: 20px;
}

.overview-card span {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 999px;
  color: var(--teal-700);
  background: #ccfbf1;
  padding: 5px 11px;
  font-weight: 800;
}

.overview-card h2 {
  margin-top: 10px;
  margin-bottom: 8px;
}

.overview-card p {
  margin-bottom: 22px;
  color: #475569;
}

.detail-hero {
  background-size: cover;
  background-position: center;
}

.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #dbeafe;
  margin-bottom: 28px;
}

.breadcrumb a {
  color: #fcd34d;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.detail-info h1 {
  margin: 16px 0 8px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-lead {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-info .btn-primary {
  margin-top: 26px;
}

.detail-main {
  display: grid;
  gap: 30px;
}

.player-card,
.content-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--teal-600);
  box-shadow: 0 12px 38px rgba(20, 184, 166, 0.42);
  font-size: 34px;
}

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

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card h2:not(:first-child) {
  margin-top: 28px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
  margin-top: 30px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 34px;
}

.site-footer h2 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 0 26px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    display: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .top-search {
    order: 4;
    width: 100%;
    min-width: 0;
  }

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

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-arrow {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-arrow.prev {
    left: 18px;
  }

  .hero-arrow.next {
    right: 18px;
  }

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

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

  .detail-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero-content h1,
  .hero-content h2,
  .detail-info h1,
  .inner-hero h1 {
    font-size: 32px;
  }

  .hero-text,
  .detail-lead,
  .inner-hero p {
    font-size: 16px;
  }

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

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

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

  .player-card,
  .content-card {
    padding: 14px;
    border-radius: 20px;
  }
}
