:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --dark: #020617;
  --dark-2: #0f172a;
  --gold: #facc15;
  --radius: 1rem;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.28);
}

.header-inner {
  width: min(1280px, calc(100% - 2rem));
  height: 4.25rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
}

.brand-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.28);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  color: #94a3b8;
  font-size: 0.76rem;
  margin-top: 0.1rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-link {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #e2e8f0;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #67e8f9;
}

.header-search,
.mobile-search,
.quick-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search input,
.mobile-search input,
.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  outline: none;
  padding: 0.8rem 1rem;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.quick-search input::placeholder,
.filter-panel input::placeholder {
  color: #94a3b8;
}

.header-search button,
.mobile-search button,
.quick-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  font-weight: 700;
  cursor: pointer;
}

.header-search {
  width: 21rem;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.6rem 0.8rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.2rem;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: #0f172a;
  padding: 1rem;
}

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

.mobile-panel nav {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mobile-panel nav a {
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  position: relative;
  min-height: 560px;
  background: var(--dark);
  overflow: hidden;
}

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

.hero-slide {
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  max-width: 780px;
  padding-top: 4rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 1.05;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.8;
  margin: 1.2rem 0 0;
}

.hero-tags,
.detail-tags,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero .tag-pill,
.detail-hero .tag-pill {
  color: #cffafe;
  border-color: rgba(103, 232, 249, 0.36);
  background: rgba(8, 145, 178, 0.22);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  padding: 0.9rem 1.45rem;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.32);
}

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

.ghost-button {
  color: #ffffff;
  padding: 0.9rem 1.45rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-button.dark {
  color: var(--ink);
  background: #f1f5f9;
}

.secondary-button {
  color: #ffffff;
  background: #0f172a;
  padding: 0.75rem 1rem;
}

.secondary-button.small {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

.text-link {
  color: var(--brand);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 2;
}

.hero-dot {
  width: 0.85rem;
  height: 0.85rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 2.4rem;
  border-radius: 999px;
  background: #67e8f9;
}

.quick-search-panel,
.content-section,
.page-main,
.footer-inner,
.footer-bottom,
.breadcrumb {
  width: min(1280px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: -2.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.quick-links a {
  color: #cffafe;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 999px;
  padding: 0.65rem 0.8rem;
}

.content-section {
  padding: 4rem 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.ranking-box h2,
.detail-text h2,
.detail-side h2,
.player-section h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
}

.section-heading p,
.ranking-box p {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.section-more {
  color: var(--brand);
  font-weight: 800;
}

.category-grid,
.movie-grid,
.overview-grid {
  display: grid;
  gap: 1.2rem;
}

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

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

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

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-box,
.detail-text,
.detail-side,
.ranking-row,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.category-card {
  overflow: hidden;
  padding: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover,
.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-thumbs,
.overview-poster-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.category-thumbs img,
.overview-poster-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.65rem;
  background: #e2e8f0;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0.3rem 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.category-card em,
.category-overview-card p {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.65;
}

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent);
}

.poster-play {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 18px rgba(6, 182, 212, 0.35);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card h3 {
  margin: 0.55rem 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  min-height: 3.3rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-meta span {
  border-radius: 999px;
  background: #eff6ff;
  padding: 0.28rem 0.55rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
}

.ranking-box {
  position: sticky;
  top: 5.4rem;
  padding: 1.3rem;
}

.ranking-box ol {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
}

.rank-link {
  display: grid;
  grid-template-columns: 2.2rem 3.5rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.rank-number,
.ranking-index {
  color: var(--brand-2);
  font-weight: 900;
}

.rank-link img {
  width: 3.5rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.55rem;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  margin-top: 0.2rem;
}

.page-main {
  padding-bottom: 4rem;
}

.page-hero {
  margin-top: 1.4rem;
  border-radius: 1.4rem;
  padding: clamp(2rem, 5vw, 4rem);
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 58%, #0891b2 100%);
  overflow: hidden;
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem auto;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.2rem;
}

.filter-panel input,
.filter-panel select {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1rem;
  align-items: center;
}

.category-overview-card h2 {
  font-size: 1.35rem;
}

.ranking-list {
  display: grid;
  gap: 0.85rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 4.2rem 4rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
}

.ranking-cover img {
  width: 4.2rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.7rem;
}

.ranking-info h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

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

.detail-main {
  padding-top: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.breadcrumb a {
  color: var(--brand);
  font-weight: 700;
}

.detail-hero {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  border-radius: 1.4rem;
  padding: 2rem;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(6, 182, 212, 0.32), transparent 28%), linear-gradient(135deg, #020617, #1e293b 58%, #0f172a);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 1.1rem;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.35);
}

.detail-one-line {
  color: #dbeafe;
  font-size: 1.15rem;
  line-height: 1.8;
  margin: 1rem 0 0;
}

.player-section {
  width: min(1280px, calc(100% - 2rem));
  margin: 3rem auto 0;
}

.player-section h2 {
  margin-bottom: 1rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-cover-shade {
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.88));
}

.play-button-large {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5.2rem;
  height: 5.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.12), 0 24px 50px rgba(6, 182, 212, 0.32);
  font-size: 2rem;
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
}

.detail-text,
.detail-side {
  padding: 1.4rem;
}

.detail-text p {
  color: #334155;
  line-height: 1.9;
  font-size: 1rem;
  margin: 0.7rem 0 1.4rem;
}

.detail-side dl {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.8rem;
}

.detail-side dl div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  font-weight: 700;
}

.prev-next {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.prev-next a {
  flex: 1;
  text-align: center;
  border-radius: 999px;
  padding: 0.75rem;
  color: #ffffff;
  background: #0f172a;
  font-weight: 800;
}

.site-footer {
  margin-top: 4rem;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  padding: 2.5rem 0;
}

.footer-inner p {
  max-width: 620px;
  line-height: 1.8;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.75rem 1.5rem;
  align-content: start;
}

.footer-links a {
  color: #e2e8f0;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1rem 0 1.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

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

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

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

  .header-search {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: 520px;
  }

  .quick-search-panel,
  .split-layout,
  .overview-grid,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-box {
    position: static;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .quick-search-panel,
  .content-section,
  .page-main,
  .footer-inner,
  .footer-bottom,
  .breadcrumb,
  .detail-hero,
  .player-section {
    width: min(100% - 1rem, 1280px);
  }

  .brand-text small {
    display: none;
  }

  .hero-content {
    width: min(100% - 1rem, 1280px);
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2rem;
  }

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

  .category-overview-card,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .overview-poster-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .detail-hero {
    padding: 1rem;
  }
}
