:root {
  --ice-50: #f0f9ff;
  --ice-100: #e0f2fe;
  --ice-300: #7dd3fc;
  --ice-400: #38bdf8;
  --ice-500: #0ea5e9;
  --ice-600: #0284c7;
  --ice-700: #0369a1;
  --ice-900: #0c4a6e;
  --snow-50: #fafafa;
  --snow-100: #f4f4f5;
  --snow-200: #e4e4e7;
  --snow-300: #d4d4d8;
  --snow-500: #71717a;
  --snow-700: #3f3f46;
  --snow-800: #27272a;
  --snow-900: #18181b;
  --white: #ffffff;
  --shadow-sm: 0 10px 30px rgba(3, 105, 161, 0.10);
  --shadow-md: 0 18px 45px rgba(3, 105, 161, 0.16);
  --shadow-lg: 0 32px 80px rgba(12, 74, 110, 0.24);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--snow-900);
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.18), transparent 30%),
    linear-gradient(180deg, var(--ice-50), var(--white) 380px, var(--snow-50));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(228, 228, 231, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ice-500), var(--ice-700));
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 20px;
  color: var(--snow-900);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  font-size: 14px;
  color: var(--snow-700);
  transition: color 0.2s ease;
}

.nav-link:hover,
.hot-link {
  color: var(--ice-700);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--snow-300);
  border-radius: 14px;
  padding: 11px 14px;
  background: var(--white);
  color: var(--snow-900);
  outline: none;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--ice-400);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.header-search button,
.btn,
.section-more,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  color: var(--white);
  background: var(--ice-600);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.btn:hover,
.section-more:hover,
.inline-link:hover {
  transform: translateY(-1px);
  background: var(--ice-700);
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.22);
}

.btn.primary {
  background: linear-gradient(135deg, var(--ice-500), var(--ice-700));
}

.btn.ghost,
.btn.ghost.light {
  color: var(--ice-900);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.btn.ghost.light {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--snow-900);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 22px 18px;
  border-top: 1px solid var(--snow-200);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--snow-700);
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  margin: 28px auto 0;
  min-height: 620px;
  overflow: hidden;
  border-radius: 36px;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  background: var(--snow-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  height: 100%;
  object-fit: cover;
  filter: blur(18px) scale(1.08);
  opacity: 0.72;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 32%, rgba(56, 189, 248, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(12, 74, 110, 0.98), rgba(24, 24, 27, 0.78) 52%, rgba(24, 24, 27, 0.42));
}

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

.hero-label,
.section-kicker {
  margin: 0 0 12px;
  color: var(--ice-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.chip-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ice-900);
  background: rgba(224, 242, 254, 0.92);
  font-size: 12px;
  font-weight: 700;
}

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

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 66px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  white-space: nowrap;
}

.hero-dot.is-active {
  color: var(--ice-900);
  background: var(--ice-100);
}

.stats-strip,
.content-section,
.page-main,
.movie-detail-main {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 22px;
}

.stats-strip div {
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.stats-strip strong {
  display: block;
  color: var(--ice-700);
  font-size: 30px;
}

.stats-strip span {
  color: var(--snow-500);
}

.content-section {
  padding: 34px 22px;
}

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

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

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

.section-more,
.inline-link {
  color: var(--white);
  white-space: nowrap;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-tile {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.26), transparent 36%),
    linear-gradient(135deg, var(--white), var(--ice-50));
  border: 1px solid rgba(186, 230, 253, 0.8);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-tile span {
  color: var(--snow-700);
  font-weight: 800;
}

.category-tile strong {
  color: var(--ice-700);
  font-size: 24px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(228, 228, 231, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ice-100), var(--snow-200));
}

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  color: var(--white);
  background: rgba(2, 132, 199, 0.88);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  font-weight: 800;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.3);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 7px;
  min-height: 46px;
  font-size: 16px;
  line-height: 1.42;
}

.movie-info h3 a:hover {
  color: var(--ice-700);
}

.meta-line,
.movie-desc,
.result-count {
  color: var(--snow-500);
  font-size: 13px;
  line-height: 1.6;
}

.movie-desc {
  min-height: 42px;
}

.chip-row span {
  padding: 4px 8px;
  font-size: 11px;
}

.page-main,
.movie-detail-main {
  padding: 28px 0 0;
}

.page-hero,
.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 34px;
  padding: 56px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(125, 211, 252, 0.35), transparent 32%),
    linear-gradient(135deg, var(--ice-900), var(--snow-900));
  box-shadow: var(--shadow-lg);
}

.slim-hero {
  min-height: 260px;
}

.category-hero,
.ranking-hero {
  background:
    radial-gradient(circle at 78% 30%, rgba(56, 189, 248, 0.42), transparent 30%),
    linear-gradient(135deg, #075985, #18181b);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.category-panels {
  display: grid;
  gap: 18px;
}

.category-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--snow-200);
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-panel-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-panel-images img {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.category-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-panel p {
  color: var(--snow-500);
  line-height: 1.7;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--snow-200);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--snow-200);
  text-align: left;
}

.rank-table th {
  color: var(--ice-900);
  background: var(--ice-50);
}

.rank-table a {
  color: var(--ice-700);
  font-weight: 800;
}

.detail-hero {
  padding: 32px 42px 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--ice-300);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.detail-section {
  display: grid;
  gap: 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.42), transparent 36%),
    rgba(0, 0, 0, 0.58);
  cursor: pointer;
  text-align: center;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ice-900);
  background: var(--white);
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

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

.player-start small {
  color: rgba(255, 255, 255, 0.72);
}

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

.text-card {
  border: 1px solid var(--snow-200);
  border-radius: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.text-card h2 {
  margin: 0 0 12px;
  color: var(--ice-900);
}

.text-card p {
  margin: 0;
  color: var(--snow-700);
  line-height: 1.9;
}

.info-list-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}

.info-list-card div {
  border-radius: 16px;
  padding: 14px;
  background: var(--ice-50);
}

.info-list-card dt {
  color: var(--snow-500);
  font-size: 12px;
}

.info-list-card dd {
  margin: 4px 0 0;
  color: var(--snow-900);
  font-weight: 800;
}

.site-footer {
  margin-top: 54px;
  color: var(--snow-300);
  background: var(--snow-900);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 22px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer h2 {
  color: var(--white);
  font-size: 18px;
}

.site-footer p,
.site-footer li {
  color: var(--snow-300);
  line-height: 1.7;
}

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

.site-footer a:hover {
  color: var(--ice-300);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 22px;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--ice-600);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.back-top.is-visible {
  display: block;
}

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

  .header-search {
    margin-left: auto;
  }

  .mobile-menu-btn {
    display: flex;
  }

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

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

@media (max-width: 900px) {
  .hero-carousel {
    margin: 14px;
    min-height: 720px;
    border-radius: 28px;
  }

  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
    padding: 36px 24px 92px;
  }

  .hero-poster,
  .detail-poster {
    max-width: 250px;
  }

  .hero-controls {
    left: 24px;
    right: 24px;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .page-hero,
  .detail-hero {
    margin: 0 14px;
    padding: 34px 24px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 14px;
  }

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

  .header-search {
    display: none;
  }

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

  .hero-desc,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .stats-strip,
  .content-section {
    padding: 18px 14px;
  }

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

  .movie-info h3 {
    font-size: 14px;
  }

  .movie-desc {
    display: none;
  }

  .section-title-row {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }

  .info-list-card dl {
    grid-template-columns: 1fr;
  }
}
