:root {
  --bg-main: #020617;
  --bg-soft: #0f172a;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --text-light: #e2e8f0;
  --brand: #2563eb;
  --brand-light: #60a5fa;
  --brand-deep: #1e3a8a;
  --gold: #f59e0b;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.26);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, 0.16);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.35);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-4deg);
}

.logo-text {
  font-size: 21px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  font-size: 15px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #93c5fd;
}

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

.header-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  background: rgba(255, 255, 255, 0.10);
  outline: none;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.header-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
}

.header-search button,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.30);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: white;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: white;
  background: var(--bg-main);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 36%, rgba(37, 99, 235, 0.46), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.20) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 45%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  min-height: 680px;
  gap: 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.28);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.inner-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p,
.inner-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.hero-tags span,
.tag-list span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.24);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(-8deg);
}

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

.hero-poster span,
.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(37, 99, 235, 0.88);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-size: 32px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
  width: 32px;
  background: #60a5fa;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -44px;
  position: relative;
  z-index: 3;
}

.quick-panel div {
  padding: 22px;
  border-radius: var(--radius-md);
  color: white;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92));
  box-shadow: var(--shadow-md);
}

.quick-panel strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.quick-panel span {
  color: #bfdbfe;
  font-size: 14px;
}

.content-section {
  padding: 56px 0;
}

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

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

.section-title p {
  margin: 0;
  max-width: 620px;
  color: var(--text-soft);
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 14px;
  background: white;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.category-card strong,
.category-card span {
  display: block;
}

.category-card span {
  color: var(--text-soft);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.70), transparent 60%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after,
.movie-card:hover .card-play {
  opacity: 1;
}

.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-badge {
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.card-play {
  z-index: 2;
  opacity: 0;
  width: 58px;
  height: 58px;
  transition: opacity 0.25s ease;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--brand);
}

.card-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.card-meta span:last-child {
  color: var(--gold);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  padding: 16px;
  background: white;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text-main);
  background: #f8fafc;
  outline: none;
}

.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  font-weight: 800;
  cursor: pointer;
}

.filter-count {
  color: var(--brand);
  white-space: nowrap;
}

.ranking-strip {
  color: white;
  background: linear-gradient(145deg, #020617, #172554 60%, #020617);
}

.ranking-strip .section-title p {
  color: #bfdbfe;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.ranking-item span {
  grid-row: span 2;
  color: #fbbf24;
  font-size: 26px;
  font-weight: 900;
}

.ranking-item strong,
.ranking-item em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-item em {
  color: #bfdbfe;
  font-style: normal;
  font-size: 13px;
}

.page-hero-main {
  min-height: 70vh;
  padding-bottom: 40px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.24), transparent 32%),
    linear-gradient(180deg, #020617 0, #0f172a 280px, #f1f5f9 281px);
}

.inner-hero {
  padding: 72px 0 28px;
  color: white;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: white;
  background: var(--bg-main);
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
  opacity: 0.48;
}

.detail-shade {
  background:
    radial-gradient(circle at 76% 28%, rgba(37, 99, 235, 0.38), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82));
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  min-height: 620px;
  padding: 54px 0;
}

.detail-poster {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.breadcrumb a:hover {
  color: white;
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow-lg);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.48);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.player-status {
  position: absolute;
  left: 24px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
}

.player-shell.is-playing .player-start,
.player-shell.is-playing .player-status {
  display: none;
}

.detail-text {
  padding-top: 34px;
}

.article-card {
  border-radius: var(--radius-lg);
  padding: 34px;
  background: white;
  box-shadow: var(--shadow-md);
}

.article-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-card p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.info-table div {
  display: grid;
  grid-template-columns: 90px 1fr;
  border-bottom: 1px solid #e2e8f0;
}

.info-table div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.info-table dt,
.info-table dd {
  margin: 0;
  padding: 12px 14px;
}

.info-table dt {
  color: var(--text-soft);
  background: #f8fafc;
  font-weight: 800;
}

.info-table dd {
  color: #1e293b;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.2fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 18px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #93c5fd;
}

.footer-two-col {
  columns: 2;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .site-nav {
    gap: 12px;
    font-size: 14px;
  }

  .header-search {
    width: 230px;
  }

  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .site-nav,
  .header-search {
    display: none;
    width: 100%;
  }

  .site-nav.is-open,
  .header-search.is-open {
    display: flex;
  }

  .site-nav.is-open {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8px;
  }

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

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

  .hero-poster,
  .detail-poster {
    max-width: 260px;
  }

  .quick-panel,
  .filter-bar,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .ranking-list {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    gap: 20px;
    padding: 44px 0 94px;
  }

  .hero p,
  .inner-hero p,
  .detail-copy p {
    font-size: 15px;
  }

  .hero-poster {
    display: none;
  }

  .quick-panel,
  .filter-bar,
  .footer-grid,
  .info-table {
    grid-template-columns: 1fr;
  }

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

  .content-section {
    padding: 36px 0;
  }

  .section-title {
    display: block;
  }

  .detail-layout {
    gap: 24px;
    min-height: 560px;
  }

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

  .player-section {
    margin-top: -34px;
  }

  .article-card {
    padding: 22px;
  }

  .info-table div,
  .info-table div:nth-last-child(-n + 2) {
    grid-template-columns: 86px 1fr;
    border-bottom: 1px solid #e2e8f0;
  }
}
