:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --purple: #7c3aed;
  --slate: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #020617, #0f172a 46%, #020617);
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.38);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: #94a3b8;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  white-space: nowrap;
  flex: 1;
}

.main-nav a,
.mobile-nav a {
  color: #e2e8f0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #67e8f9;
}

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

.header-search input,
.inline-filter input,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: #0f172a;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.inline-filter input:focus,
.search-page-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.header-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  cursor: pointer;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 18px;
  background: #020617;
}

.mobile-nav.is-open {
  display: flex;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.18), transparent 26%), radial-gradient(circle at 78% 32%, rgba(124, 58, 237, 0.18), transparent 30%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 150px;
  background: linear-gradient(0deg, #f8fafc, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(103, 232, 249, 0.35);
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -2px;
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 44px);
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
  margin: 24px 0;
}

.hero-tags,
.tag-list,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-meta span,
.card-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-card {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 34px 80px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(18px);
}

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

.hero-card div {
  padding: 18px;
  color: #ffffff;
  display: grid;
  gap: 6px;
}

.hero-card strong {
  font-size: 20px;
}

.hero-card span {
  color: #cbd5e1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #67e8f9;
}

.section {
  padding: 70px 0;
}

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

.section-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.8px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head.light h2,
.section-head.light p {
  color: #ffffff;
}

.section-link {
  color: #0f172a;
  border: 1px solid var(--line);
  background: #ffffff;
}

.light-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #0891b2;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.dark-section {
  background: linear-gradient(135deg, #020617, #0f172a 45%, #172554);
}

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.dark-section .card-body p,
.dark-section .card-meta span,
.dark-section .tag-list span {
  color: #cbd5e1;
}

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

.category-tile {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.category-tile span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

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

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.tile-0,
.tile-4 {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.tile-1,
.tile-5 {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.tile-2,
.tile-6 {
  background: linear-gradient(135deg, #10b981, #0f766e);
}

.tile-3,
.tile-7 {
  background: linear-gradient(135deg, #ec4899, #7c3aed);
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.24), transparent 24%), linear-gradient(135deg, #020617, #0f172a 52%, #172554);
}

.slim-hero {
  padding: 82px 0 72px;
}

.slim-hero h1 {
  margin-bottom: 18px;
}

.slim-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.crumb a:hover {
  color: #67e8f9;
}

.inline-filter {
  width: min(340px, 100%);
}

.category-overview-block {
  margin-top: 54px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 68px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.rank-num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.rank-thumb img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.heat {
  color: #0891b2;
  white-space: nowrap;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.detail-hero {
  min-height: 620px;
  padding: 70px 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: 36px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(2, 6, 23, 0.5);
  background: #0f172a;
}

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

.detail-info h1 {
  font-size: clamp(38px, 6vw, 66px);
  margin-bottom: 20px;
}

.detail-one-line {
  color: #e0f2fe;
  font-size: 20px;
  line-height: 1.8;
  max-width: 820px;
}

.detail-meta span,
.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin: 18px 0 28px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.26), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  z-index: 3;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.38);
  font-size: 34px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-card {
  border-radius: 26px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
}

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

.footer-grid p {
  margin: 0;
  line-height: 1.8;
  color: #94a3b8;
}

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  text-align: center;
}

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

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

  .header-search {
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero-card {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero {
    min-height: 640px;
    height: auto;
  }

  .hero-slide {
    min-height: 640px;
  }

  .hero-content {
    padding: 70px 0 100px;
  }

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

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

  .ranking-item {
    grid-template-columns: 54px 76px minmax(0, 1fr);
  }

  .heat {
    display: none;
  }

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

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

@media (max-width: 520px) {
  .brand {
    min-width: 0;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -1px;
  }

  .hero p,
  .detail-one-line {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .card-body p {
    min-height: auto;
  }

  .slim-hero,
  .section {
    padding: 50px 0;
  }
}
