:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --blue: #2563eb;
  --indigo: #4338ca;
  --shadow: 0 20px 35px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  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(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.25);
  font-size: 14px;
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-weight: 650;
  color: #374151;
}

.desktop-nav a:hover,
.nav-dropdown:hover > a {
  color: var(--teal);
}

.nav-dropdown {
  position: relative;
  padding: 24px 0;
}

.dropdown-menu {
  position: absolute;
  top: 66px;
  left: -18px;
  width: 210px;
  padding: 10px;
  display: grid;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #374151;
}

.dropdown-menu a:hover,
.mobile-menu a:hover {
  background: #ecfeff;
  color: var(--teal);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-panel input,
.search-panel select,
.inline-filter {
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  outline: none;
  padding: 11px 16px;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 220px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.search-panel select:focus,
.inline-filter:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.top-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: #f3f4f6;
  color: #111827;
}

.mobile-menu {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

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

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d9488 0%, #2563eb 50%, #4338ca 100%);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px), radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.32) 0 3px, transparent 3px);
  background-size: 62px 62px, 90px 90px;
}

.hero-container {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
}

.hero-slider {
  width: 100%;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 54px;
  color: #fff;
}

.hero-slide.is-active {
  display: grid;
  animation: heroFade 0.65s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #bfdbfe;
}

.hero-copy h1 {
  margin: 18px 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-tags,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags .tag-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.btn-primary {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
}

.btn-ghost:hover,
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost-light {
  border: 2px solid rgba(255, 255, 255, 0.82);
  color: #fff;
}

.hero-poster {
  position: relative;
  width: min(100%, 390px);
  justify-self: end;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.36);
  transform: rotate(2deg);
  background: rgba(255, 255, 255, 0.15);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), transparent 55%);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal);
  font-size: 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 78px;
  display: flex;
  gap: 10px;
}

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

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

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-stats-wrap {
  position: relative;
  z-index: 3;
  margin-top: -64px;
}

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

.hero-stat {
  display: block;
  min-height: 124px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-stat:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.14);
}

.hero-stat strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.hero-stat span {
  color: var(--muted);
}

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

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

.section-heading h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

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

.section-link {
  flex: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ecfeff;
  color: var(--teal-dark);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.movie-card-featured .movie-poster {
  aspect-ratio: 16 / 11;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 58%);
  opacity: 0.8;
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(8px);
}

.poster-meta-left {
  left: 12px;
  top: 12px;
}

.poster-meta-right {
  right: 12px;
  bottom: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.32;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--teal);
}

.movie-card-body p {
  margin: 0 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 210px;
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow-soft);
  transition: 0.22s ease;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.45s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.18));
}

.category-card div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
}

.category-card span {
  display: block;
  margin-bottom: 7px;
  font-size: 23px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal), var(--blue) 55%, var(--indigo));
  color: #fff;
}

.page-hero {
  padding: 86px 0 94px;
}

.page-hero h1 {
  max-width: 780px;
  margin: 12px 0 16px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
}

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

.category-overview-card {
  min-height: auto;
  background: var(--surface);
  color: var(--ink);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 150px;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.category-cover-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 7px 0 8px;
}

.category-overview-body p {
  margin: 0;
  color: var(--muted);
}

.toolbar-card,
.search-panel {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.inline-filter {
  width: 100%;
}

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

.search-status {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  min-height: 500px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.24));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 500px;
  padding: 62px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.36);
  background: rgba(255, 255, 255, 0.16);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 750;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 18px;
  max-width: 780px;
  color: #dbeafe;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding-top: 42px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.watch-panel,
.detail-card,
.side-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.watch-panel {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.2));
  color: #fff;
  text-align: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--teal);
  font-size: 30px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

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

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.side-card {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.side-card dd {
  margin: -8px 0 0;
  color: #111827;
  font-weight: 700;
}

.site-footer {
  margin-top: 82px;
  padding-top: 48px;
  color: #d1d5db;
  background: linear-gradient(135deg, #1e293b, #0f172a 58%, #134e4a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 36px;
  padding-bottom: 38px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #cbd5e1;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.is-hidden-card {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 96px 0 120px;
  }

  .hero-poster {
    justify-self: start;
    max-width: 280px;
  }

  .hero-dots {
    bottom: 62px;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .hero-section,
  .hero-container {
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

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

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

  .movie-card-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .detail-cover {
    max-width: 240px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-slide {
    gap: 28px;
    padding: 68px 0 110px;
  }

  .hero-poster {
    max-width: 220px;
    border-radius: 24px;
  }

  .hero-stat {
    padding: 22px;
  }

  .movie-grid,
  .featured-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .movie-card-featured {
    grid-column: auto;
  }

  .page-hero {
    padding: 62px 0 72px;
  }

  .detail-hero-inner {
    padding: 42px 0;
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
  }
}
