:root {
  --primary: #0059c0;
  --primary-dark: #00469b;
  --primary-soft: #e6f1ff;
  --accent: #ff6b00;
  --text: #121826;
  --muted: #64748b;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.16), 0 20px 25px -5px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

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

.nav-wrap {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 24px rgba(0, 89, 192, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--primary);
}

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

.nav-search input,
.mobile-panel input,
.search-box input,
.search-box select {
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
}

.nav-search input:focus,
.mobile-panel input:focus,
.search-box input:focus,
.search-box select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 89, 192, 0.12);
}

.nav-search button,
.mobile-panel button,
.btn,
.player-btn,
.search-box button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-panel button:hover,
.btn:hover,
.player-btn:hover,
.search-box button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 89, 192, 0.22);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  display: none;
  min-height: 560px;
  position: relative;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
  transform: scale(1.02);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 107, 0, 0.36), transparent 30%),
    linear-gradient(90deg, rgba(6, 12, 24, 0.94), rgba(6, 12, 24, 0.76) 42%, rgba(6, 12, 24, 0.22)),
    linear-gradient(0deg, rgba(6, 12, 24, 0.88), rgba(6, 12, 24, 0.04) 45%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 78px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.66fr);
  gap: 42px;
  align-items: center;
}

.hero-copy {
  max-width: 730px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #dbeafe;
  font-weight: 700;
  font-size: 14px;
}

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

.hero p {
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 26px;
}

.hero-actions,
.section-head,
.detail-meta,
.card-meta,
.tag-row,
.breadcrumbs,
.pagination,
.hero-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 2 / 2.65;
  object-fit: cover;
  border-radius: 22px;
}

.hero-panel h2 {
  margin: 16px 6px 6px;
  font-size: 24px;
}

.hero-panel p {
  margin: 0 6px 10px;
  font-size: 14px;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
}

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

.hero-dots button.active {
  width: 32px;
  background: #ffffff;
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 70px;
}

.section {
  margin: 0 0 52px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.75;
}

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

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

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

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

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

.category-tile span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.movie-card,
.wide-card,
.info-card,
.search-box {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.wide-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
}

.poster-link img,
.wide-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.tag-row span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3,
.wide-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover,
.rank-list a:hover,
.breadcrumbs a:hover {
  color: var(--primary);
}

.movie-card p,
.wide-card p,
.info-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.card-meta,
.detail-meta {
  color: #6b7280;
  font-size: 13px;
}

.card-meta {
  justify-content: space-between;
}

.wide-list {
  display: grid;
  gap: 18px;
}

.wide-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
}

.wide-poster {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 72px minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.rank-no {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 70% 10%, rgba(255, 107, 0, 0.28), transparent 30%),
    linear-gradient(135deg, #00469b, #07172f 72%);
  padding: 58px 0;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}

.page-hero p {
  color: #dbeafe;
  max-width: 780px;
  line-height: 1.8;
}

.search-box {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px 120px;
  gap: 12px;
  margin-bottom: 28px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-card,
.sidebar-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.player-btn {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  font-size: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.player-caption,
.detail-card,
.sidebar-card {
  padding: 22px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}

.detail-card h2,
.sidebar-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: #334155;
  line-height: 1.92;
  font-size: 16px;
}

.poster-side {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 3 / 4.15;
  background: #dbeafe;
}

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

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.related-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
}

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

.info-card {
  padding: 22px;
}

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

.pagination {
  justify-content: center;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #334155;
  font-weight: 700;
}

.pagination .active {
  background: var(--primary);
  color: #ffffff;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 46px 24px 26px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.75;
}

.footer-grid h3 {
  color: #ffffff;
  margin: 0 0 16px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  color: #94a3b8;
  margin: 9px 0;
}

.footer-grid a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: 1280px;
  margin: 26px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  text-align: center;
}

@media (max-width: 1100px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

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

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

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

@media (max-width: 760px) {
  .nav-wrap {
    padding: 0 16px;
  }

  .hero,
  .hero-slide,
  .hero-inner {
    min-height: 720px;
  }

  .hero-inner {
    padding: 42px 16px 70px;
  }

  .main {
    padding: 32px 16px 56px;
  }

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

  .wide-card,
  .rank-row,
  .search-box {
    grid-template-columns: 1fr;
  }

  .wide-poster {
    max-width: 220px;
  }

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

@media (max-width: 480px) {
  .brand {
    font-size: 17px;
  }

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

  .hero-panel {
    padding: 12px;
  }
}
