:root {
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --cyan-600: #0891b2;
  --blue-600: #2563eb;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--teal-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.brand-text {
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.mobile-link {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  transform: translateY(-1px);
}

.nav-link-soft {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  background: rgba(15, 118, 110, 0.96);
  backdrop-filter: blur(12px);
}

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

main {
  min-height: 70vh;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  background: var(--slate-900);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 620px;
  padding: 76px max(24px, calc((100vw - 1240px) / 2)) 140px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(720px, 100%);
  animation: rise-in 0.7s ease both;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--teal-700);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.14), rgba(8, 145, 178, 0.14));
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-kicker {
  color: #dffcff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-content h1,
.page-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  background: #e6fffb;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
  box-shadow: 0 16px 35px rgba(13, 148, 136, 0.35);
}

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

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-ghost.dark {
  color: var(--teal-700);
  background: #e6fffb;
  border-color: rgba(13, 148, 136, 0.22);
}

.hero-control-row {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.hero-dots {
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-thumb img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.hero-thumb span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
  font-size: 13px;
}

.home-search-band,
.content-section,
.detail-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -48px;
  position: relative;
  z-index: 5;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.home-search-band h2,
.section-heading h2,
.panel-title h2,
.detail-section h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.home-search-form,
.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.home-search-form input,
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 14px;
  color: var(--gray-900);
}

.home-search-form button,
.search-clear {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
  font-weight: 900;
  cursor: pointer;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--gray-600);
}

.section-link,
.text-link {
  min-height: 40px;
  color: var(--teal-700);
  background: #e6fffb;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-700), var(--cyan-600), var(--blue-600));
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  top: -56px;
  right: -44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
  position: relative;
  font-size: 24px;
  line-height: 1.1;
}

.category-tile em {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

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

.compact-grid {
  gap: 18px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0891b2, #2563eb);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(15, 23, 42, 0.85));
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--amber-500), var(--rose-500));
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line span,
.detail-meta span {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--gray-100);
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 46px;
  color: var(--gray-600);
  font-size: 14px;
}

.ranking-panel {
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 54px 1fr;
  grid-template-rows: auto auto;
  gap: 0 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--gray-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #e6fffb;
  transform: translateX(3px);
}

.rank-row span {
  grid-row: 1 / 3;
  font-size: 18px;
  color: var(--teal-700);
  font-weight: 900;
}

.rank-row img {
  grid-row: 1 / 3;
  width: 54px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 12px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 64px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--teal-700), var(--cyan-600));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.mini-hero,
.search-hero,
.category-hero {
  background: radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.72), transparent 36%), linear-gradient(135deg, var(--slate-900), var(--teal-700), var(--cyan-600));
}

.search-panel {
  margin-bottom: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--gray-700);
  font-weight: 900;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--teal-700);
  background: #e6fffb;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.active {
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-600));
}

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--gray-600);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px;
  background: linear-gradient(135deg, var(--teal-700), var(--cyan-600));
}

.category-cover-stack img {
  width: 100%;
  height: 122px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

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

.category-card-body h2 {
  margin: 10px 0 10px;
  font-size: 26px;
}

.category-card-body p {
  color: var(--gray-600);
}

.detail-shell {
  padding: 34px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.detail-card,
.detail-section {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-frame {
  position: relative;
  background: #000000;
}

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

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--teal-700);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-trigger span {
  margin-left: 5px;
  font-size: 34px;
}

.play-trigger:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-frame.is-playing .play-trigger {
  opacity: 0;
  pointer-events: none;
}

.detail-body {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  padding: 30px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: var(--shadow-card);
}

.detail-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-tags {
  margin: 16px 0;
}

.lead-text {
  max-width: 820px;
  color: var(--gray-700);
  font-size: 18px;
}

.detail-section {
  margin-top: 24px;
  padding: 30px;
}

.detail-section h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.review-section {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.site-footer {
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
  padding: 46px 0 34px;
}

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

.footer-grid p {
  max-width: 470px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .hero-control-row,
  .home-search-band,
  .split-section,
  .detail-body,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .nav-shell {
    width: min(100% - 24px, 1240px);
  }

  .brand-text {
    font-size: 18px;
  }

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

  .hero-slide {
    padding: 52px 18px 150px;
  }

  .hero-thumbs {
    display: none;
  }

  .home-search-band,
  .content-section,
  .detail-shell,
  .page-hero {
    width: min(100% - 24px, 1240px);
  }

  .home-search-band,
  .page-hero,
  .detail-body,
  .detail-section {
    padding: 22px;
  }

  .home-search-form,
  .search-box {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

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

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

  .movie-card h2 {
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }

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

  .category-cover-stack img {
    height: 120px;
  }

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

  .play-trigger {
    width: 66px;
    height: 66px;
  }

  .play-trigger span {
    font-size: 26px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }
}
