:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(96, 165, 250, 0.22);
  --text: #e5edf8;
  --muted: #93a4b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.42);
  color-scheme: dark;
}

* {
  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:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.34);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.active,
.mobile-nav-link.active {
  color: #67e8f9;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.66);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-panel input {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 11px 14px;
  min-width: 220px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 14px 20px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px 56px;
}

.hero {
  position: relative;
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel-strong);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 64px;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.015);
}

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

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker,
.rank-badge {
  display: inline-flex;
  align-items: center;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-title h1,
.detail-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p,
.page-title p,
.detail-overview p,
.play-copy p {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.9;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.tag-list span {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions,
.card-actions,
.detail-actions,
.pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.ghost-button,
.card-actions a,
.detail-actions a,
.pagination-actions a {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  border: 1px solid rgba(96, 165, 250, 0.26);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button,
.card-actions a:first-child,
.detail-actions a:first-child,
.pagination-actions a:first-child {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.25);
}

.ghost-button,
.card-actions a:last-child,
.detail-actions a:last-child,
.pagination-actions a {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
}

.primary-button:hover,
.ghost-button:hover,
.card-actions a:hover,
.detail-actions a:hover,
.pagination-actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.7);
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(203, 213, 225, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.content-section,
.page-title,
.category-panel,
.detail-panel,
.player-panel,
.search-panel {
  margin-top: 34px;
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.content-section,
.category-panel,
.detail-panel,
.player-panel,
.search-panel {
  padding: 28px;
}

.page-title {
  padding: 38px;
}

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

.section-heading h2,
.category-head h2,
.detail-panel h2,
.player-panel h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p,
.category-head p,
.card-body p,
.rank-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: #67e8f9;
  font-weight: 800;
}

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

.movie-card {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.54);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.52);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.35), rgba(8, 47, 73, 0.28));
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88));
}

.duration,
.card-category {
  position: absolute;
  z-index: 2;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.duration {
  top: 10px;
  right: 10px;
}

.card-category {
  left: 10px;
  bottom: 10px;
  background: rgba(37, 99, 235, 0.86);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 9px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.42;
}

.card-body h3 a:hover {
  color: #67e8f9;
}

.card-body p {
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 14px;
}

.card-meta span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.09);
  padding: 5px 8px;
}

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.82));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.65);
}

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

.category-tile span {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 136px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(34, 211, 238, 0.14));
  color: #67e8f9;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

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

.rank-copy h3 {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 30px;
  align-items: start;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.24);
}

.article-copy {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.article-copy section {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.36);
}

.article-copy h2 {
  margin-top: 0;
}

.article-copy p {
  color: #cbd5e1;
  line-height: 2;
}

.player-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: black;
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: var(--shadow);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-message {
  color: #bfdbfe;
  margin: 16px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
}

.search-panel form {
  display: flex;
  width: min(720px, 100%);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.36);
}

.search-panel input {
  flex: 1;
  min-width: 0;
}

.no-results {
  color: #cbd5e1;
  padding: 30px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.site-footer {
  margin-top: 26px;
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: 28px;
  color: #94a3b8;
}

.footer-inner p {
  line-height: 1.9;
}

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

.footer-links a {
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 8px 11px;
}

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

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

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

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

  .hero {
    min-height: 560px;
  }

  .hero-slide {
    padding: 34px 24px;
  }

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

  .rank-item {
    grid-template-columns: 54px 96px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 2 / -1;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 18px 12px 42px;
  }

  .hero {
    min-height: 520px;
    border-radius: 22px;
  }

  .hero h1,
  .page-title h1,
  .detail-title h1 {
    font-size: 38px;
  }

  .content-section,
  .category-panel,
  .detail-panel,
  .player-panel,
  .search-panel,
  .page-title {
    padding: 18px;
    border-radius: 20px;
  }

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

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

  .rank-thumb {
    width: 100%;
  }
}
