:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #06b6d4;
  --brand-dark: #0e7490;
  --navy: #0f172a;
  --blue: #1e3a8a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #eff6ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner,
.page-wrap,
.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  box-shadow: 0 12px 25px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #67e8f9;
  font-size: 12px;
  margin-top: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #dbeafe;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #22d3ee;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.open {
  display: block;
}

.mobile-link,
.mobile-category-links a {
  display: block;
  padding: 12px 14px;
  color: #e0f2fe;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-category-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #22d3ee;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.25), transparent 30%), linear-gradient(135deg, #172554, #0f172a 42%, #164e63);
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(14, 116, 144, 0.36) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.68fr);
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

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

.kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #22d3ee;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.1;
}

.hero-desc {
  margin: 0 0 24px;
  max-width: 680px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  color: var(--brand-dark);
  border: 1px solid rgba(6, 182, 212, 0.34);
  background: rgba(6, 182, 212, 0.08);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-panel {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.36);
}

.hero-panel-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #dbeafe;
  font-size: 14px;
}

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

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

.hero-dot.active {
  background: #22d3ee;
}

.page-wrap {
  padding: 42px 0 72px;
}

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

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.page-title {
  margin-bottom: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: var(--shadow);
}

.page-title p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.movie-card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.card-meta span,
.card-meta a {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

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

.movie-card p {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  box-shadow: var(--shadow);
}

.category-card strong {
  margin-bottom: 12px;
  font-size: 24px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.8;
}

.category-card span {
  margin-top: auto;
  color: var(--brand-dark);
  font-weight: 800;
}

.filter-box,
.search-box {
  display: flex;
  gap: 12px;
  margin: 20px 0 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-box input,
.search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  outline: none;
  font-size: 16px;
}

.filter-box input:focus,
.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 90px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-number {
  color: #0891b2;
  font-size: 24px;
  font-weight: 900;
}

.rank-item img {
  width: 76px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumbs a {
  color: #0e7490;
  font-weight: 700;
}

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

.detail-main,
.detail-side,
.player-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-main {
  overflow: hidden;
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  background: #020617;
}

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

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.86));
  cursor: pointer;
  text-align: center;
}

.player-mask[hidden] {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #fff;
}

.detail-body {
  padding: 28px;
}

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 22px;
}

.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-weight: 800;
  font-size: 13px;
}

.detail-body h2,
.detail-side h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-body p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  padding: 20px;
  position: sticky;
  top: 100px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: #0f172a;
}

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

.side-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
}

.side-item img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  line-height: 1.35;
}

.side-item small {
  color: var(--muted);
}

.site-footer {
  color: #dbeafe;
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.6fr 1.2fr;
  gap: 24px;
  padding: 34px 0;
}

.footer-inner p {
  color: #bfdbfe;
  line-height: 1.8;
}

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

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

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 22px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.empty-state.show {
  display: block;
}

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

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

  .hero-panel {
    display: none;
  }

  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    height: 66px;
  }

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

  .hero,
  .hero-slider,
  .hero-inner {
    min-height: 560px;
  }

  .hero-inner {
    padding: 48px 0 72px;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .section-head,
  .filter-box,
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

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

  .rank-item .btn-ghost {
    grid-column: 2 / -1;
  }
}

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

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

  .hero h1 {
    font-size: 38px;
  }
}
