:root {
  color-scheme: light;
  --blue-950: #0b1b3a;
  --blue-900: #12346d;
  --blue-800: #1e4f9b;
  --blue-700: #2563eb;
  --blue-600: #2f73ff;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f7f9fc;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 48%, #f5f8ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(16px);
}

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

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

.site-logo {
  min-width: max-content;
  font-size: 22px;
}

.logo-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-600), #22c55e);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

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

.nav-link,
.nav-more-button,
.nav-more-panel a {
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link,
.nav-more-button {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.nav-more-button:hover {
  color: var(--blue-700);
  background: var(--blue-50);
}

.nav-more {
  position: relative;
}

.nav-more-button {
  border: 0;
  background: transparent;
}

.nav-more-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 168px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-more:hover .nav-more-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-more-panel a {
  display: block;
  padding: 9px 12px;
}

.nav-more-panel a:hover {
  color: var(--blue-700);
  background: var(--blue-50);
}

.header-search {
  display: flex;
  align-items: center;
  width: 260px;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 8px 10px 8px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search button {
  padding: 8px 14px;
  color: #ffffff;
  background: var(--blue-700);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--blue-50);
  border-radius: 14px;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue-950);
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: grid;
  gap: 6px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.mobile-panel input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.55), transparent 34%),
    linear-gradient(135deg, #08162f 0%, #12346d 48%, #2563eb 100%);
}

.hero-slide {
  display: none;
  min-height: 660px;
  position: relative;
  isolation: isolate;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.28;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.12);
  transform: scale(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 14, 32, 0.92) 0%, rgba(8, 22, 47, 0.72) 48%, rgba(37, 99, 235, 0.52) 100%);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  min-height: 660px;
  margin: 0 auto;
  padding: 92px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: #bfdbfe;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

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

.primary-button,
.ghost-button,
.section-link,
.load-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--blue-950);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.22);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.load-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 10px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  background: rgba(3, 7, 18, 0.72);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

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

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.page-hero {
  margin: 32px 0;
  padding: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.content-section {
  margin-top: 58px;
}

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

.section-head h2 {
  margin: 0 0 6px;
  color: var(--blue-950);
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-link,
.load-button {
  color: #ffffff;
  background: var(--blue-700);
  border: 0;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

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

.movie-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  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 {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.14);
  transform: translateY(-6px);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #ffffff);
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.07);
}

.cover-year,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 9px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.cover-year {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(37, 99, 235, 0.88);
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--blue-950);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--blue-700);
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: var(--blue-800);
  background: var(--blue-50);
}

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

.category-card {
  display: flex;
  min-height: 210px;
  padding: 26px;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(135deg, #0f2a5d, #2563eb);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f3a5d, #16a34a);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #38175f, #7c3aed);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 68px rgba(15, 23, 42, 0.18);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.85);
}

.category-card span {
  display: inline-flex;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 12px;
  margin: 28px 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(47, 115, 255, 0.12);
}

.no-result {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue-700);
  font-weight: 800;
}

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

.detail-panel,
.side-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.detail-panel {
  overflow: hidden;
}

.detail-cover {
  aspect-ratio: 16 / 8;
  overflow: hidden;
}

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

.detail-body {
  padding: 30px;
}

.detail-body h1 {
  margin: 0 0 14px;
  color: var(--blue-950);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.meta-pill {
  color: var(--blue-800);
  background: var(--blue-50);
}

.detail-tags {
  margin: 18px 0 24px;
}

.detail-tags span {
  color: #334155;
  background: #f1f5f9;
}

.detail-copy h2 {
  margin: 30px 0 12px;
  color: var(--blue-950);
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 16px;
  color: #334155;
  font-size: 17px;
}

.player-section {
  margin: 26px 0 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050a16;
  border-radius: 28px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.26);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050a16;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(5, 10, 22, 0.16), rgba(5, 10, 22, 0.72));
  border: 0;
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-ring {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 6px;
  color: var(--blue-950);
  background: #ffffff;
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.player-overlay strong {
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.side-panel {
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 16px;
  color: var(--blue-950);
  font-size: 22px;
}

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

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

.side-item:hover {
  background: var(--blue-50);
  transform: translateX(3px);
}

.side-item img {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--blue-950);
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1.2fr;
  gap: 30px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 460px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a,
.footer-cats a {
  padding: 7px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.footer-links a:hover,
.footer-cats a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.55);
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: var(--blue-700);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.3);
  font-size: 20px;
  font-weight: 900;
}

.back-top.show {
  display: block;
}

.hidden-card {
  display: none;
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 64px;
  }

  .hero-poster {
    max-width: 360px;
  }

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

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

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

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

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

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

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 46px 0 64px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .movie-info {
    padding: 14px;
  }

  .movie-title {
    min-height: 44px;
    font-size: 16px;
  }

  .movie-info p {
    min-height: 42px;
    font-size: 13px;
  }

  .page-hero {
    padding: 28px;
    border-radius: 24px;
  }

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

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

  .detail-body {
    padding: 22px;
  }

  .player-shell {
    border-radius: 20px;
  }

  .play-ring {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}

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

  .hero-poster {
    max-width: none;
  }
}
