*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --night: #0f172a;
  --danger: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f3f7fb;
  color: var(--ink);
  line-height: 1.6;
}

img,
video {
  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.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.35);
}

.brand-text {
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ecfeff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-dark);
  border-radius: 99px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.32), transparent 32%),
    linear-gradient(135deg, #0f766e 0%, #0d9488 48%, #06b6d4 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 52px;
  padding: 72px 0;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(42px, 6vw, 76px);
}

.hero-subtitle {
  display: block;
  margin-top: 18px;
  font-size: clamp(22px, 3vw, 34px);
  color: #cffafe;
}

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

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

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

.btn-primary {
  color: var(--primary-dark);
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  background: #f8fafc;
}

.btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-search {
  display: flex;
  width: min(100%, 620px);
  margin-top: 32px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 14px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
  color: var(--primary-dark);
  background: #ffffff;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
}

.hero-stage {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(160px, 0.72fr) minmax(180px, 1fr);
  align-items: end;
  gap: 18px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 32px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-slide:hover .hero-poster img {
  transform: scale(1.05);
}

.hero-card {
  margin: 0 0 20px -46px;
  padding: 26px;
  border-radius: 26px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(16px);
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.15;
}

.hero-card p {
  margin: 0 0 18px;
  color: #475569;
}

.hero-card .tag-row span {
  background: #e0f2fe;
  color: #0369a1;
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.stats-band,
.section,
.page-section {
  padding: 72px 0;
}

.stats-grid,
.category-grid,
.movie-grid,
.related-grid {
  display: grid;
  gap: 24px;
}

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

.stat-card,
.category-card,
.movie-card,
.panel-card,
.search-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 28px;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--primary-dark);
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #ccfbf1;
  font-weight: 800;
}

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.section-head p,
.page-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -38px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18), rgba(6, 182, 212, 0.18));
}

.category-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(13, 148, 136, 0.24);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 20px 0 8px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card .small-link {
  position: relative;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.movie-card:hover .poster-link img,
.rank-item:hover .rank-thumb img {
  transform: scale(1.06);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(13, 148, 136, 0.9);
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 12px;
}

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

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

.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover,
.inline-links a:hover {
  color: var(--primary-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.dark-section {
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 25%, rgba(20, 184, 166, 0.28), transparent 28%),
    linear-gradient(135deg, #111827, #0f172a);
}

.dark-section .section-head p {
  color: #cbd5e1;
}

.dark-section .section-kicker {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow-soft);
}

.dark-section .rank-item {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #dbeafe;
}

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

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: #475569;
}

.dark-section .rank-content p,
.dark-section .movie-meta-line {
  color: #dbeafe;
}

.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 800;
}

.page-hero {
  padding: 70px 0 48px;
  background:
    radial-gradient(circle at 85% 10%, rgba(6, 182, 212, 0.18), transparent 30%),
    linear-gradient(180deg, #ffffff, #f3f7fb);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--primary-dark);
  font-weight: 800;
}

.filter-panel {
  margin: -20px auto 30px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 180px;
  gap: 16px;
}

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

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  background: #ffffff;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.cards-wrap {
  padding-bottom: 72px;
}

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

.no-results {
  display: none;
  padding: 42px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
}

.no-results.show {
  display: block;
}

.detail-hero {
  padding: 44px 0 74px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(45, 212, 191, 0.24), transparent 34%),
    linear-gradient(135deg, #0f172a, #134e4a 54%, #0891b2);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 60px);
}

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

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ecfeff;
  font-weight: 800;
}

.player-panel {
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.player-box {
  overflow: hidden;
  position: relative;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-cover.is-hidden {
  display: none;
}

.play-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 104px;
  height: 104px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.play-trigger::before {
  content: "▶";
  margin-left: 4px;
  font-size: 34px;
  line-height: 1;
}

.player-error-text {
  display: none;
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
  text-align: center;
}

.player-box.player-error .player-error-text {
  display: block;
}

.detail-section {
  padding: 48px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.panel-card {
  padding: 28px;
}

.panel-card h2,
.panel-card h3 {
  margin: 0 0 14px;
}

.panel-card p {
  margin: 0 0 18px;
  color: #475569;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links {
  display: grid;
  gap: 12px;
}

.inline-links a {
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 540px;
  margin: 12px 0 0;
}

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

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

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

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

@media (max-width: 1080px) {
  .hero-inner,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero-card {
    margin-left: -20px;
  }

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

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

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

  .nav-shell {
    min-height: 64px;
  }

  .brand-text {
    max-width: 215px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero-inner {
    min-height: auto;
    padding: 54px 0 78px;
    gap: 34px;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search input {
    min-height: 44px;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-card {
    margin: -70px 14px 0;
  }

  .hero-controls {
    left: 0;
    right: auto;
    bottom: -46px;
  }

  .stats-grid,
  .category-grid,
  .movie-grid,
  .cards-wrap .movie-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

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

  .rank-item {
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: start;
  }

  .rank-num {
    width: 42px;
    height: 42px;
  }

  .rank-thumb {
    grid-row: span 2;
  }

  .rank-item .small-link {
    justify-content: flex-start;
  }

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

  .player-panel {
    margin-top: -28px;
  }

  .play-trigger {
    width: 82px;
    height: 82px;
    font-size: 15px;
  }

  .play-trigger::before {
    font-size: 28px;
  }
}
