:root {
  color-scheme: light;
  --bg: #f6fbff;
  --surface: #ffffff;
  --surface-soft: #eef7ff;
  --text: #102033;
  --muted: #65758a;
  --line: rgba(15, 23, 42, 0.09);
  --sky: #0ea5e9;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --indigo: #4f46e5;
  --rose: #f43f5e;
  --shadow: 0 24px 70px rgba(14, 92, 163, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 36rem),
    radial-gradient(circle at 85% 8%, rgba(79, 70, 229, 0.13), transparent 26rem),
    linear-gradient(180deg, #f8fcff 0%, #eef8ff 45%, #f8fbff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  min-width: 320px;
}

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

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

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);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.05);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--sky), var(--blue) 48%, var(--indigo));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong,
.footer-brand {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #0284c7, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

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

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: white;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.25);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 14px;
  background: #e8f6ff;
  color: var(--blue);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: currentColor;
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 48px;
}

.hero-shell {
  position: relative;
  min-height: 580px;
  border-radius: 36px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(4, 34, 72, 0.94), rgba(18, 78, 143, 0.88) 48%, rgba(71, 34, 140, 0.88)),
    linear-gradient(90deg, #0f172a, #0ea5e9);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-shell:before,
.hero-shell:after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.7;
  z-index: -1;
}

.hero-shell:before {
  width: 360px;
  height: 360px;
  right: 5%;
  top: -80px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.55), transparent 65%);
}

.hero-shell:after {
  width: 460px;
  height: 460px;
  left: -120px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.38), transparent 68%);
}

.hero-slides {
  min-height: 580px;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
  padding: clamp(26px, 5vw, 66px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(34px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  color: white;
  display: grid;
  gap: 18px;
}

.hero-kicker {
  width: fit-content;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  color: #dff7ff;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: rgba(241, 245, 249, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 620px;
}

.hero-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: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.btn-light {
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  min-height: 460px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 36px 80px rgba(3, 7, 18, 0.34);
  transform: rotate(1.5deg);
}

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

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 60%);
}

.hero-poster-info {
  position: absolute;
  inset-inline: 20px;
  bottom: 20px;
  z-index: 2;
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.hero-poster-info strong {
  display: block;
  font-size: 20px;
}

.hero-poster-info small {
  color: rgba(255, 255, 255, 0.78);
}

.hero-controls {
  position: absolute;
  left: clamp(26px, 5vw, 66px);
  right: clamp(26px, 5vw, 66px);
  bottom: 26px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hero-dots {
  display: inline-flex;
  gap: 8px;
  pointer-events: auto;
}

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

.hero-dot.active {
  background: white;
}

.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.13);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.quick-cats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.main-section {
  padding: 42px 0;
}

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

.section-kicker {
  color: var(--sky);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.section-more {
  color: var(--blue);
  font-weight: 900;
}

.search-panel {
  position: relative;
  margin-bottom: 24px;
}

.search-panel input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 56px 0 22px;
  outline: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.search-panel input:focus {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.12);
}

.search-icon {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sky);
  font-size: 24px;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 24px 64px rgba(14, 92, 163, 0.16);
}

.poster-wrap {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4.2;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(79, 70, 229, 0.18)),
    #e2edf7;
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-row span {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  padding: 22px;
  min-height: 158px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 248, 255, 0.86)),
    white;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(14, 92, 163, 0.14);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 8px 0 16px;
  color: var(--muted);
}

.category-tile span {
  color: var(--blue);
  font-weight: 900;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 62px minmax(0, 1fr) 58px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.rank-row img {
  width: 62px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.rank-no {
  color: var(--rose);
  font-size: 22px;
  font-weight: 1000;
  text-align: center;
}

.rank-info {
  min-width: 0;
}

.rank-info strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: #f97316;
  font-weight: 1000;
  text-align: right;
}

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

.page-card {
  padding: clamp(24px, 4vw, 46px);
  border-radius: 32px;
  color: white;
  background:
    radial-gradient(circle at right top, rgba(14, 165, 233, 0.48), transparent 42%),
    linear-gradient(135deg, #0f172a, #155e96 54%, #312e81);
  box-shadow: var(--shadow);
}

.page-card h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-card p {
  margin: 12px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: white;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.detail-main,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.detail-content {
  padding: clamp(20px, 3vw, 34px);
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-content p {
  color: #334155;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-weight: 800;
  font-size: 13px;
}

.player-box {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2)),
    rgba(2, 6, 23, 0.35);
  cursor: pointer;
  z-index: 2;
}

.player-start {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.42);
  cursor: pointer;
  font-size: 30px;
}

.player-box.playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.side-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.side-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f8fbff;
  transition: 0.2s ease;
}

.side-item:hover {
  background: #eaf6ff;
}

.side-item img {
  width: 74px;
  height: 94px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  line-height: 1.35;
}

.side-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.site-footer {
  margin-top: 54px;
  color: #d9e9ff;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  padding: 38px 0;
}

.footer-grid p {
  color: #94a3b8;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  align-content: start;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d9e9ff;
  background: rgba(255, 255, 255, 0.08);
}

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

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(14, 165, 233, 0.4);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}

@media (max-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero-shell,
  .hero-slides {
    min-height: 920px;
  }

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

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

  .footer-links {
    justify-content: start;
  }
}

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-shell,
  .hero-slides {
    min-height: 830px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
    align-content: start;
    gap: 24px;
  }

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

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

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

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

  .movie-title {
    font-size: 15px;
  }

  .rank-row {
    grid-template-columns: 38px 52px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .page-hero {
    padding-top: 32px;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }
}
