:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.2);
  --brand: #10b981;
  --brand-2: #14b8a6;
  --brand-soft: rgba(16, 185, 129, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-small: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.page {
  padding-top: 64px;
}

.content-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.32);
  transition: transform 0.28s ease;
}

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

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-copy em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  border-radius: 12px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  padding: 10px;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav-link {
  padding: 10px 12px;
}

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

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.92) 30%, rgba(2, 6, 23, 0.4) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.45) 46%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 92px;
  max-width: 1180px;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.category-panel span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-kicker {
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.detail-tags,
.poster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.poster-tags span {
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.hero-tags span,
.detail-tags span {
  padding: 5px 11px;
  font-size: 0.88rem;
}

.poster-tags span {
  padding: 3px 8px;
  font-size: 0.72rem;
}

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

.primary-button,
.ghost-button,
.section-more,
.search-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.25);
}

.ghost-button {
  min-height: 48px;
  padding: 0 20px;
  color: #d1fae5;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.search-reset:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.8rem;
  line-height: 1;
}

.hero-arrow:hover,
.hero-dot:hover,
.hero-dot.is-active {
  background: rgba(16, 185, 129, 0.88);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  padding: 0;
}

.quick-search-section,
.content-section {
  padding: 64px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.36);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-muted);
}

.section-more {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.18);
}

.search-panel {
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #a7f3d0;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.68);
  outline: none;
  padding: 0 16px;
}

.search-input:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.search-reset {
  min-height: 48px;
  padding: 0 16px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.62);
}

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

.category-tile,
.category-panel {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-tile:hover,
.category-panel:hover,
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.42);
}

.category-tile img,
.category-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile:hover img,
.category-panel:hover img {
  transform: scale(1.06);
  opacity: 0.62;
}

.category-tile::after,
.category-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.22));
}

.category-tile span,
.category-tile strong,
.category-panel div {
  position: relative;
  z-index: 2;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.category-tile span {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.18rem;
}

.category-tile strong {
  display: -webkit-box;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 500;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-panel {
  min-height: 230px;
  padding: 28px;
  display: flex;
  align-items: flex-end;
}

.category-panel div {
  max-width: 520px;
}

.category-panel h2 {
  margin: 8px 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.category-panel p {
  margin: 0;
  color: #cbd5e1;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card:hover {
  background: var(--bg-card-strong);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  font-size: 0.78rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(16, 185, 129, 0.88);
}

.poster-tags {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-tags {
  opacity: 1;
  transform: translateY(0);
}

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

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

.movie-card h3 a:hover {
  color: #34d399;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--text-muted);
}

.movie-meta {
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.movie-line {
  display: -webkit-box;
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.62);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.16);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.22), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 62%, #042f2e 100%);
}

.small-hero {
  min-height: 300px;
}

.category-hero,
.ranking-hero {
  min-height: 340px;
}

.page-hero h1 {
  max-width: 820px;
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.compact-actions {
  margin-top: 22px;
}

.movie-detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 80px 0 64px;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(4px);
  transform: scale(1.05);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 45%, rgba(2, 6, 23, 0.55) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.34));
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

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

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: #34d399;
}

.detail-copy h1 {
  max-width: 820px;
  margin: 10px 0 16px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 1.16rem;
}

.player-section {
  padding: 64px 0 28px;
  background: #020617;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 22px 52px rgba(16, 185, 129, 0.35);
}

.player-overlay strong {
  font-size: 1.08rem;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.movie-text-block,
.movie-side-block {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  padding: 28px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.movie-text-block h2,
.movie-side-block h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.movie-text-block p {
  margin: 0 0 24px;
  color: #cbd5e1;
}

.movie-text-block p:last-child {
  margin-bottom: 0;
}

.movie-side-block dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.movie-side-block dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.movie-side-block dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.movie-side-block dt {
  color: #94a3b8;
}

.movie-side-block dd {
  margin: 0;
  color: #f8fafc;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.92);
  padding: 42px 0 28px;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-shell strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.1rem;
}

.footer-shell p,
.copyright {
  color: var(--text-muted);
}

.footer-shell p {
  max-width: 680px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.footer-links a:hover {
  color: #34d399;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  font-size: 0.9rem;
}

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero-content {
    padding-bottom: 110px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .section-heading,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .search-row {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .content-shell,
  .nav-shell,
  .footer-shell,
  .copyright,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .brand-copy em {
    display: none;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    min-height: 76vh;
  }

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

  .quick-search-section,
  .content-section {
    padding: 42px 0;
  }

  .movie-detail-hero {
    min-height: auto;
    padding: 72px 0 44px;
  }

  .detail-copy h1 {
    font-size: clamp(2rem, 13vw, 3rem);
  }

  .player-section {
    padding-top: 42px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
}
