:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --warm: #fff7ed;
  --radius: 22px;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  line-height: 1.6;
}

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

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

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.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
}

.nav-bar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: #ecfeff;
  color: var(--teal);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #0f172a;
  margin: 5px 0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav .nav-link {
  display: block;
  margin-top: 6px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2 48%, #1d4ed8);
}

.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-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.28;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(13, 148, 136, 0.92), rgba(8, 145, 178, 0.88) 46%, rgba(30, 64, 175, 0.9));
}

.hero-grid {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 60px;
  padding: 80px 0 86px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ecfeff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
}

.hero-copy h2,
.page-hero h1,
.detail-copy h1,
.home-search h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p,
.home-search p {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: clamp(18px, 2vw, 24px);
  color: rgba(255, 255, 255, 0.88);
}

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

.hero-tags span,
.tag-list span,
.chip-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

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

.btn-light:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.22);
}

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

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

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 28px 75px rgba(15, 23, 42, 0.38);
  transform: rotate(2deg);
  transition: 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0) translateY(-6px);
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  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 45px rgba(15, 23, 42, 0.25);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(28px, calc((100% - 1180px) / 2));
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dots button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.hero-controls button:hover,
.hero-dots button.is-active {
  background: rgba(255, 255, 255, 0.34);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: max(28px, calc((100% - 1180px) / 2));
  bottom: 52px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  border-radius: 999px;
}

.home-search {
  background: #fff;
  padding: 30px 0;
}

.search-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: #fff;
  box-shadow: var(--shadow);
}

.home-search h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 46px);
}

.quick-search {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.18);
  padding: 8px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid transparent;
  outline: none;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
}

.quick-search input {
  padding: 14px 18px;
}

.quick-search button,
.filter-reset {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  color: #fff;
  background: #0f172a;
  cursor: pointer;
}

.section {
  padding: 76px 0;
}

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

.section-cool {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

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

.text-link {
  color: var(--teal);
  font-weight: 800;
}

.text-link:hover {
  color: var(--cyan);
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(8, 145, 178, 0.04));
  opacity: 0;
  transition: 0.24s ease;
}

.category-card:hover .category-glow {
  opacity: 1;
}

.category-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 15px 28px rgba(13, 148, 136, 0.22);
}

.category-card strong {
  position: relative;
  display: block;
  margin: 18px 0 8px;
  font-size: 22px;
}

.category-card p,
.category-card em {
  position: relative;
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.category-card em {
  margin-top: 18px;
  color: var(--teal);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #e0f2fe);
}

.featured-card .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-play {
  opacity: 0;
  transform: scale(0.9);
  transition: 0.24s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 42px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.28);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3,
.rank-row h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-row h3 a:hover {
  color: var(--teal);
}

.movie-card p,
.rank-row p {
  display: -webkit-box;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chip-row span {
  min-height: 28px;
  color: var(--teal);
  background: #ecfeff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 96px 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(135deg, #0f766e, #0891b2 52%, #1d4ed8);
}

.page-hero.compact {
  padding: 70px 0;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 160px auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(12px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  padding: 0 16px;
  border-color: #cbd5e1;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.filter-reset {
  height: 46px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.rank-preview,
.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 92px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

.rank-cover {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
  background: #ccfbf1;
}

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

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-size: 20px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.detail-grid {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 54px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.38);
}

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

.detail-copy h1 {
  max-width: 820px;
}

.detail-copy p {
  max-width: 820px;
}

.detail-meta {
  margin: 12px 0 18px;
}

.detail-meta span,
.detail-copy .tag-list span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.player-section {
  background: #0f172a;
  color: #fff;
}

.player-section h2 {
  margin: 0 0 22px;
  font-size: clamp(26px, 4vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.58));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: #fff;
  font-size: 32px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.player-start strong {
  font-size: 18px;
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0;
}

.footer-brand strong {
  color: #fff;
  font-size: 18px;
}

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

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 9px;
}

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

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

  body.nav-open .mobile-nav {
    display: block;
  }

  .hero-grid,
  .detail-grid,
  .search-banner,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 28px;
    padding-top: 58px;
  }

  .hero-poster,
  .detail-poster {
    width: min(320px, 100%);
    margin: 0 auto;
  }

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

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

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

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

  .brand-text em {
    display: none;
  }

  .hero-carousel,
  .hero-grid {
    min-height: 720px;
  }

  .hero-copy h2,
  .page-hero h1,
  .detail-copy h1,
  .home-search h1 {
    font-size: 36px;
  }

  .hero-controls {
    right: 14px;
    bottom: 20px;
  }

  .hero-dots {
    left: 14px;
    bottom: 36px;
  }

  .quick-search {
    display: grid;
    border-radius: 22px;
  }

  .quick-search button {
    height: 44px;
  }

  .section {
    padding: 54px 0;
  }

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

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .featured-grid,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    position: absolute;
    margin: 8px;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .rank-row .text-link {
    grid-column: 2;
  }

  .detail-grid {
    padding: 42px 0;
  }

  .text-card {
    padding: 22px;
  }
}
