:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --sky-50: #f0f9ff;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --gold: #f59e0b;
  --red: #dc2626;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.20);
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f4f6 45%, #eef2ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue-600), var(--blue-800), var(--blue-900));
  box-shadow: 0 10px 28px rgba(30, 64, 175, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue-700);
  background: var(--white);
  border-radius: 999px;
  box-shadow: inset 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.brand em {
  display: block;
  margin-top: 3px;
  color: var(--blue-100);
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.main-nav > a,
.nav-dropdown > button {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.92);
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.main-nav > a:hover,
.nav-dropdown > button:hover {
  color: var(--white);
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 42px;
  left: 0;
  display: grid;
  min-width: 170px;
  padding: 8px;
  color: var(--gray-800);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: 0.2s ease;
}

.nav-menu a {
  padding: 9px 12px;
  border-radius: 9px;
}

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

.nav-dropdown:hover .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.header-search input,
.search-panel input,
.search-panel select {
  border: 1px solid rgba(255, 255, 255, 0.24);
  outline: 0;
}

.header-search input {
  width: 230px;
  padding: 10px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.header-search input::placeholder {
  color: rgba(219, 234, 254, 0.9);
}

.header-search button,
.btn,
.filter-button,
.player-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
  color: var(--blue-700);
  background: var(--white);
}

.header-search button:hover,
.btn-primary:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.25);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.55), transparent 32%), linear-gradient(135deg, var(--blue-950), var(--blue-800) 52%, #0f766e);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.28;
}

.hero::after {
  position: absolute;
  right: -12%;
  bottom: -18%;
  width: 420px;
  height: 420px;
  content: "";
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  filter: blur(8px);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 70px 0 84px;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--blue-100);
  font-size: clamp(17px, 2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
}

.btn-primary {
  color: var(--blue-700);
  background: var(--white);
}

.btn-ghost {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 560px;
}

.stat-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.stat-card strong {
  display: block;
  font-size: 25px;
}

.stat-card span {
  color: var(--blue-100);
  font-size: 13px;
}

.hero-slider {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 22px;
  align-items: end;
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  transition: 0.45s ease;
  backdrop-filter: blur(12px);
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}

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

.hero-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.hero-panel p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  padding: 4px 9px;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-controls {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-controls button {
  width: 38px;
  height: 38px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
}

.section {
  padding: 58px 0;
}

.section-muted {
  background: rgba(255, 255, 255, 0.56);
}

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

.section-head h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe 45%, #e0f2fe);
}

.poster-wrap img {
  transition: 0.45s ease;
}

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

.poster-wrap::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), transparent);
  opacity: 0;
  transition: 0.25s ease;
}

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

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--white);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-hot {
  top: 12px;
  right: 12px;
  background: var(--red);
}

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

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.category-card {
  padding: 22px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.category-card:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  transform: translateY(-5px);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card span {
  color: inherit;
  opacity: 0.78;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--gold), #ef4444);
  border-radius: 14px;
  font-weight: 900;
}

.rank-info strong {
  display: block;
  font-size: 18px;
}

.rank-info span,
.rank-heat {
  color: var(--gray-600);
  font-size: 13px;
}

.page-hero {
  padding: 54px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-950), var(--blue-700));
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--blue-100);
  font-size: 18px;
}

.breadcrumb {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

.detail-card {
  padding: 26px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.detail-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.detail-meta span {
  padding: 7px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 14px;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
}

.player-box {
  overflow: hidden;
  background: var(--gray-950);
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.35), rgba(3, 7, 18, 1));
}

.video-wrap video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--white);
  text-align: center;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.25));
}

.player-button {
  padding: 14px 24px;
  color: var(--blue-700);
  background: var(--white);
  font-size: 17px;
}

.player-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 170px));
  gap: 12px;
  padding: 18px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  width: 100%;
  padding: 12px 13px;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
}

.filter-button {
  padding: 12px 16px;
  color: var(--white);
  background: var(--blue-700);
}

.empty-state {
  padding: 30px;
  color: var(--gray-600);
  background: var(--white);
  border-radius: 18px;
  text-align: center;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, var(--gray-950), var(--gray-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  color: #9ca3af;
}

.footer-small {
  font-size: 13px;
}

.site-footer h3 {
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 18px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
}

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

  .mobile-toggle {
    display: block;
  }

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

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

  .hero-slider {
    min-height: 440px;
  }

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

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

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

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

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

  .brand em {
    display: none;
  }

  .hero-inner {
    min-height: 0;
    padding: 42px 0 58px;
  }

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

  .hero-slide {
    grid-template-columns: 116px 1fr;
    gap: 14px;
    padding: 12px;
  }

  .hero-slider {
    min-height: 360px;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .detail-layout,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .section-head,
  .rank-item {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .rank-item {
    gap: 8px;
  }

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

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

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: grid;
  }

  .hero-slider {
    min-height: 0;
  }
}
