:root {
  color-scheme: light;
  --ice-50: #f0f9ff;
  --ice-100: #e0f2fe;
  --ice-200: #bae6fd;
  --ice-500: #0ea5e9;
  --ice-600: #0284c7;
  --ice-700: #0369a1;
  --glacier-50: #ecfeff;
  --glacier-600: #0891b2;
  --snow-50: #ffffff;
  --snow-100: #fafafa;
  --snow-200: #f4f4f5;
  --snow-300: #e4e4e7;
  --snow-600: #52525b;
  --snow-700: #3f3f46;
  --snow-800: #27272a;
  --snow-900: #18181b;
  --shadow-soft: 0 18px 50px rgba(2, 132, 199, 0.16);
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 35%),
    linear-gradient(180deg, var(--snow-50), var(--ice-50) 48%, var(--snow-50));
  color: var(--snow-900);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(186, 230, 253, 0.75);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--snow-900);
}

.site-logo {
  font-size: 24px;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ice-600), var(--glacier-600));
  color: #fff;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--snow-700);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ice-700);
  background: var(--ice-50);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--ice-200);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.10);
}

.header-search input,
.mobile-search input,
.search-panel input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 180px;
  padding: 10px 12px;
  color: var(--snow-800);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.secondary-button,
.play-button,
.inline-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.play-button,
.inline-button {
  background: linear-gradient(135deg, var(--ice-600), var(--glacier-600));
  color: #fff;
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.24);
}

.header-search button {
  padding: 10px 16px;
}

.primary-button,
.secondary-button,
.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ice-700);
  border: 1px solid rgba(186, 230, 253, 0.95);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.play-button:hover,
.inline-button:hover {
  transform: translateY(-2px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--ice-200);
  border-radius: 14px;
  background: #fff;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--snow-800);
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--ice-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ice-50);
  color: var(--snow-800);
  font-weight: 800;
}

.mobile-search {
  display: flex;
  gap: 8px;
  border: 1px solid var(--ice-200);
  border-radius: 18px;
  padding: 6px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
}

.mobile-search button {
  padding: 10px 16px;
}

.main-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(186, 230, 253, 0.78);
  background:
    radial-gradient(circle at 80% 12%, rgba(14, 165, 233, 0.20), transparent 30%),
    linear-gradient(135deg, #f8fdff, #ecfeff 42%, #ffffff);
}

.hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 68px 0 52px;
}

.hero-carousel {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 38px;
  align-items: center;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(2, 132, 199, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ice-700);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(2, 132, 199, 0.10);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: var(--snow-900);
}

.hero h1 span {
  color: var(--ice-700);
}

.hero-summary {
  width: min(680px, 100%);
  margin: 0 0 26px;
  color: var(--snow-700);
  font-size: 18px;
  line-height: 1.9;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.meta-row span,
.tag-list span,
.detail-tags span,
.category-chip,
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--ice-50);
  color: var(--ice-700);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-visual {
  position: relative;
  min-height: 500px;
}

.hero-glow {
  position: absolute;
  inset: 12% 2% 8% 2%;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.26), rgba(8, 145, 178, 0.14));
  filter: blur(48px);
}

.hero-poster-stack {
  position: relative;
  display: grid;
  grid-template-columns: 0.74fr 1fr;
  gap: 16px;
  align-items: end;
}

.hero-poster-main,
.hero-poster-side {
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 34px;
  background: linear-gradient(135deg, var(--ice-100), var(--glacier-50));
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.hero-poster-main {
  min-height: 470px;
}

.hero-poster-side {
  min-height: 310px;
  transform: translateY(-24px) rotate(3deg);
}

.hero-poster-main img,
.hero-poster-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 3;
}

.hero-floating-card {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: min(320px, 78%);
  padding: 18px;
  border: 1px solid rgba(186, 230, 253, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-floating-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--snow-900);
}

.hero-floating-card p {
  margin: 0;
  color: var(--snow-600);
  line-height: 1.7;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dots button {
  width: 42px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--ice-200);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--ice-600);
}

.section {
  padding: 58px 0;
}

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

.section-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--snow-900);
  letter-spacing: -0.04em;
}

.section-title h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-title p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--snow-600);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(2, 132, 199, 0.36);
  box-shadow: 0 24px 60px rgba(2, 132, 199, 0.18);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(160deg, rgba(2, 132, 199, 0.72), rgba(8, 145, 178, 0.44)),
    var(--poster-image);
  background-size: cover;
  background-position: center;
}

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

.poster-img.is-hidden {
  opacity: 0;
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.50));
  pointer-events: none;
}

.poster-type,
.poster-year {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ice-700);
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  left: auto;
  right: 12px;
}

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

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

.movie-card h2 a:hover {
  color: var(--ice-700);
}

.movie-line {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--snow-600);
  line-height: 1.7;
}

.meta-row {
  gap: 7px;
  margin-bottom: 12px;
}

.meta-row span {
  background: var(--snow-100);
  color: var(--snow-600);
}

.tag-list,
.detail-tags,
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.category-box {
  padding: 24px;
  border: 1px solid rgba(186, 230, 253, 0.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.category-box h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.category-box .chip-grid a {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--ice-50);
  color: var(--ice-700);
  font-weight: 800;
}

.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.rank-panel,
.content-panel,
.search-panel,
.detail-panel {
  border: 1px solid rgba(186, 230, 253, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.rank-panel,
.content-panel,
.detail-panel {
  padding: 24px;
}

.rank-panel h2,
.content-panel h2,
.detail-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.simple-list {
  display: grid;
  gap: 10px;
}

.simple-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: var(--snow-100);
  transition: 0.2s ease;
}

.simple-card:hover {
  transform: translateX(4px);
  background: var(--ice-50);
}

.simple-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--ice-700);
  font-weight: 900;
}

.simple-title {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simple-meta {
  color: var(--snow-600);
  font-size: 14px;
  white-space: nowrap;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 38px 0 8px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  padding: 10px 13px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  border-radius: 999px;
  background: #fff;
  color: var(--snow-700);
  text-align: center;
  font-weight: 800;
}

.pagination .is-current {
  background: var(--ice-600);
  color: #fff;
  border-color: var(--ice-600);
}

.search-panel {
  padding: 12px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  min-width: 0;
  flex: 1;
  padding: 16px;
}

.search-panel button {
  padding: 0 22px;
}

.search-state {
  min-height: 42px;
  margin: 18px 0;
  color: var(--snow-600);
  font-weight: 700;
}

.player-section {
  background: linear-gradient(180deg, #05070a, #0f172a);
}

.player-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  pointer-events: auto;
}

.play-button::before {
  content: "▶";
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-message {
  margin-top: 12px;
  color: #f8fafc;
  min-height: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  padding: 34px 0 58px;
}

.detail-title {
  margin-bottom: 22px;
}

.detail-title h1 {
  font-size: clamp(32px, 4vw, 54px);
}

.detail-panel p,
.content-panel p {
  margin: 0 0 16px;
  color: var(--snow-700);
  line-height: 1.95;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.detail-meta-grid div {
  padding: 13px;
  border-radius: 16px;
  background: var(--snow-100);
  color: var(--snow-700);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--snow-900);
}

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

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

.related-grid .movie-line {
  display: none;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.side-stack .poster-frame {
  border-radius: 24px;
}

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

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

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

.site-footer p {
  margin: 0;
  color: var(--snow-300);
  line-height: 1.8;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

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

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

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

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

  .mobile-menu-button {
    display: inline-block;
  }

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

  .hero-visual {
    min-height: 420px;
  }

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

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

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

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 38px 0 34px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-summary {
    font-size: 16px;
  }

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

  .hero-poster-side,
  .hero-floating-card {
    display: none;
  }

  .hero-poster-main {
    min-height: 360px;
  }

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

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

  .simple-card {
    grid-template-columns: 46px 1fr;
  }

  .simple-meta {
    grid-column: 2;
  }

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

  .search-panel form {
    flex-direction: column;
  }

  .search-panel button {
    padding: 14px 18px;
  }
}
