
:root {
  --bg: #030712;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --accent-3: #22d3ee;
  --danger: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(16, 185, 129, 0.18), transparent 34%),
    radial-gradient(circle at 88% 2%, rgba(20, 184, 166, 0.16), transparent 32%),
    linear-gradient(180deg, #020617 0%, #08111f 44%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 75%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(20px);
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #022c22;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #ffffff, #7dd3fc, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a,
.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover {
  color: #ecfeff;
  background: rgba(20, 184, 166, 0.12);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 280px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.header-search input,
.large-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 8px 12px;
}

.header-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: #042f2e;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  white-space: nowrap;
}

.header-search button {
  padding: 8px 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 48px;
  padding: 112px max(24px, calc((100vw - 1240px) / 2)) 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
  filter: saturate(1.12) blur(1px);
  opacity: 0.58;
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 46%, rgba(2, 6, 23, 0.48) 100%),
    radial-gradient(circle at 70% 18%, rgba(16, 185, 129, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617 100%);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 980px;
  background: linear-gradient(90deg, #ffffff 0%, #a7f3d0 48%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

.featured-title {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(13, 148, 136, 0.12));
  box-shadow: var(--shadow);
}

.featured-title h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 44px);
}

.featured-title p,
.movie-brief,
.rank-info p,
.content-card p {
  margin: 0;
  color: var(--muted-strong);
}

.hero-meta,
.tag-row,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.tag-row span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

.hero-tags {
  margin-top: 14px;
}

.hero-actions {
  margin-top: 28px;
}

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

.primary-btn {
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.24);
}

.ghost-btn {
  border: 1px solid var(--border);
  color: #ccfbf1;
  background: rgba(15, 23, 42, 0.7);
}

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

.ghost-btn:hover {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(20, 184, 166, 0.13);
}

.hero-poster {
  position: relative;
  align-self: center;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.26), rgba(8, 47, 73, 0.58));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.hero-poster::before {
  position: absolute;
  inset: -1px;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, transparent 58%, rgba(2, 6, 23, 0.72));
  pointer-events: none;
}

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

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

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

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.section-block {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading a {
  flex: none;
  color: #67e8f9;
  font-weight: 700;
}

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

.category-tile {
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 90% 10%, rgba(45, 212, 191, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.42));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 850;
}

.category-tile small {
  color: var(--muted);
}

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

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

.movie-card {
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(14, 116, 144, 0.18)),
    #0f172a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 60%, rgba(2, 6, 23, 0.74) 100%);
  opacity: 0.84;
  pointer-events: none;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
  filter: saturate(1.1);
}

.movie-card:hover .poster-frame {
  border-color: rgba(45, 212, 191, 0.55);
}

.rank-badge,
.score-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--danger), #ef4444);
}

.score-chip {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: #ecfeff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-card h3 {
  margin: 0 0 6px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info a:hover {
  color: #5eead4;
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-brief {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 10px;
  gap: 6px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: #99f6e4;
  font-size: 12px;
}

.mini-section + .mini-section {
  margin-top: 54px;
}

.mini-section-title h3 {
  margin: 0 0 18px;
  color: #ccfbf1;
  font-size: 24px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.slim-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 84px 24px 72px;
  background:
    radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.32));
}

.page-hero-inner {
  width: min(1060px, 100%);
}

.large-search {
  display: flex;
  gap: 10px;
  width: min(720px, 100%);
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.large-search input {
  padding: 12px 16px;
}

.large-search button {
  padding: 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #7dd3fc;
}

.detail-hero {
  min-height: 600px;
  margin-top: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  width: min(1240px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  padding: 72px 0;
}

.detail-poster {
  border-radius: 28px;
}

.detail-info h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.detail-meta span {
  color: #e0f2fe;
}

.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 54px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #f8fafc;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at center, rgba(16, 185, 129, 0.22), transparent 40%);
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #022c22;
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.32);
}

.player-overlay strong {
  font-size: clamp(22px, 3vw, 34px);
}

.player-overlay small {
  color: var(--muted-strong);
}

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

.content-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.68);
}

.rank-number,
.rank-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 900;
}

.rank-number {
  width: 52px;
  height: 52px;
  color: #022c22;
  font-size: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

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

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-score {
  min-width: 96px;
  min-height: 44px;
  padding: 0 12px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.12);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 28px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1120px) {
  .nav-container {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: flex;
    justify-self: end;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  .main-nav.is-open {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    padding-bottom: 14px;
  }

  .hero-slide {
    grid-template-columns: minmax(0, 1fr);
    min-height: 760px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .brand-text {
    font-size: 18px;
  }

  .hero {
    min-height: 740px;
  }

  .hero-slide {
    padding: 88px 16px 70px;
  }

  .featured-title {
    padding: 18px;
  }

  .hero-actions a {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 10px;
  }

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

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

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

  .detail-poster {
    width: min(280px, 70vw);
  }

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

  .rank-row {
    grid-template-columns: 42px 74px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-brief,
  .tag-row {
    display: none;
  }

  .large-search {
    border-radius: var(--radius-md);
    flex-direction: column;
  }

  .large-search button {
    min-height: 42px;
  }
}
