:root {
  color-scheme: light;
  --sky: #0ea5e9;
  --sky-deep: #0284c7;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --rose: #fb7185;
  --gray-950: #020617;
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 72px rgba(14, 165, 233, 0.28);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 44%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(14px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky), var(--cyan));
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
}

.logo-text {
  background: linear-gradient(90deg, var(--sky), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--gray-700);
  font-weight: 700;
}

.nav a {
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--sky);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 236px;
  height: 40px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 0 46px 0 18px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.header-search button {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--cyan));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--gray-800);
  background: var(--gray-100);
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-panel .nav {
  display: grid;
  gap: 12px;
  padding: 14px 0;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(115deg, #38bdf8 0%, #06b6d4 46%, #2563eb 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.12) 25%, transparent 25%);
  background-size: 64px 64px;
  opacity: 0.22;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% -10%;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.23));
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.02fr 0.88fr;
  gap: 52px;
  align-items: center;
  min-height: 620px;
  padding: 70px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-title span {
  color: #e0f2fe;
}

.hero-lead {
  max-width: 680px;
  margin: 0 0 30px;
  color: #ecfeff;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--sky-deep);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(10px);
}

.btn-sky {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--cyan));
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.25);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-tags a,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 800;
}

.hero-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-carousel {
  position: relative;
  min-height: 490px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 20px;
  align-items: end;
  min-height: 490px;
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.2);
}

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

.hero-card {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.hero-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-card p {
  margin: 0 0 16px;
  color: #f0f9ff;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  bottom: 10px;
  right: 18px;
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  width: 26px;
  background: var(--white);
}

.section {
  padding: 72px 0;
}

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

.section.blue-tint {
  background: linear-gradient(180deg, #eff6ff, #ecfeff);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.more-link {
  color: var(--sky);
  font-weight: 850;
  white-space: nowrap;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.card-poster img {
  transition: transform 0.48s ease;
}

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.68));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
  opacity: 1;
}

.badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 9px;
  border-radius: 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.badge-left {
  left: 10px;
  background: var(--sky);
}

.badge-right {
  right: 10px;
  background: var(--purple);
}

.badge-year {
  top: auto;
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
}

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

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

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-title {
  color: var(--sky);
}

.card-text {
  margin: 0 0 13px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  line-height: 1.4;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 24px;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--cyan));
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #a78bfa, #ec4899);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.category-card:nth-child(5n) {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.page-hero {
  color: var(--white);
  padding: 68px 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(110deg, var(--sky), var(--cyan));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

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

.filter-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
  font-weight: 850;
}

.pagination .current {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--cyan));
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--white);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky), var(--cyan));
  font-weight: 950;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  background: #e0f2fe;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-info p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
}

.detail-shell {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 44%);
}

.detail-hero {
  padding: 56px 0;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(2, 132, 199, 0.9), rgba(6, 182, 212, 0.82)),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.24), transparent 28%);
}

.detail-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 700;
}

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

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 860px;
  margin: 0 0 24px;
  color: #ecfeff;
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 850;
}

.watch-section {
  padding: 48px 0 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.76));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.player-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--sky);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  font-size: 32px;
}

.player-title {
  font-size: 22px;
  font-weight: 950;
}

.content-card {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin: 26px 0;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--gray-900);
  font-size: 28px;
  font-weight: 950;
}

.content-card p {
  margin: 0 0 16px;
  color: var(--gray-700);
  line-height: 1.9;
  font-size: 17px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  margin-top: 24px;
}

.search-box input {
  border: 0;
  outline: none;
  padding: 0 16px;
  color: var(--gray-800);
  background: transparent;
}

.search-results-note {
  margin: 0 0 24px;
  color: var(--gray-600);
  font-weight: 700;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--gray-600);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--sky);
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-carousel {
    min-height: auto;
  }

  .hero-slide,
  .hero-slide.is-active {
    grid-template-columns: 155px 1fr;
    min-height: auto;
  }

  .detail-cover {
    width: min(260px, 75vw);
  }

  .rank-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .header-inner {
    min-height: 64px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    padding: 46px 0 58px;
    gap: 34px;
  }

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

  .hero-poster {
    width: min(250px, 80vw);
  }

  .section {
    padding: 48px 0;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-text {
    font-size: 13px;
  }

  .page-hero,
  .detail-hero {
    padding: 44px 0;
  }

  .content-card {
    padding: 22px;
  }

  .search-box {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
