:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --primary: #10b981;
  --primary-strong: #059669;
  --cyan: #22d3ee;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-text {
  font-size: 1.55rem;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.3);
  font-size: 0.8rem;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #6ee7b7;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.inline-filter input,
.inline-filter select {
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border-radius: 999px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 16px;
}

.top-search button,
.mobile-search button,
.inline-filter button,
.primary-button,
.ghost-button,
.section-more,
.rank-action,
.player-toolbar button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.top-search button,
.mobile-search button,
.inline-filter button,
.primary-button,
.rank-action,
.player-toolbar button {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.top-search button {
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.menu-button {
  display: none;
  margin-left: auto;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.mobile-search button {
  padding: 10px 16px;
}

.mobile-nav {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(0deg, #020617 3%, rgba(2, 6, 23, 0.82) 34%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 12%;
  width: min(720px, calc(100% - 64px));
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.88);
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.28);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 18px;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
}

.card-tags span {
  padding: 5px 9px;
  font-size: 0.78rem;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-size: 1rem;
}

.primary-button:hover,
.top-search button:hover,
.mobile-search button:hover,
.inline-filter button:hover,
.rank-action:hover,
.player-toolbar button:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.38);
}

.ghost-button:hover {
  border-color: rgba(52, 211, 153, 0.7);
  color: #a7f3d0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 2.1rem;
  cursor: pointer;
  z-index: 4;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: var(--primary);
}

.page-container,
.category-strip,
.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-stack {
  display: grid;
  gap: 64px;
  padding: 58px 0 78px;
}

.category-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.6fr;
  gap: 26px;
  align-items: center;
  padding: 34px;
  margin-top: -42px;
  position: relative;
  z-index: 8;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.72), rgba(8, 47, 73, 0.66));
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.category-strip h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.category-strip p,
.section-head p,
.page-hero p,
.movie-card-body p,
.rank-content p,
.detail-info p,
.side-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.category-pills a {
  padding: 10px 15px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.category-pills a:hover {
  background: rgba(16, 185, 129, 0.24);
}

.content-section {
  position: relative;
}

.soft-panel {
  padding: 36px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.2), rgba(8, 47, 73, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.12);
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-head p,
.page-hero p {
  margin: 0;
}

.section-more {
  white-space: nowrap;
  color: #6ee7b7;
  font-weight: 700;
}

.section-more:hover {
  color: #a7f3d0;
}

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 22;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(6, 78, 59, 0.2));
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card-body h2 a:hover {
  color: #6ee7b7;
}

.movie-card-body p {
  margin: 0 0 12px;
  min-height: 52px;
  font-size: 0.92rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.85rem;
}

.page-hero {
  margin: 34px 0 34px;
  padding: 44px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 78, 59, 0.38));
  border: 1px solid rgba(52, 211, 153, 0.14);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.tool-panel {
  margin: 0 0 28px;
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.inline-filter {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
}

.inline-filter.search-main {
  grid-template-columns: 1fr auto;
}

.inline-filter input,
.inline-filter select {
  min-width: 140px;
  padding: 12px 16px;
}

.inline-filter button {
  padding: 12px 22px;
}

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

.category-card a {
  display: block;
  height: 100%;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(6, 78, 59, 0.22));
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.34);
}

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(16, 185, 129, 0.25);
}

.category-card h2 {
  margin: 18px 0 10px;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.16);
}

.rank-panel {
  padding: 34px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  font-weight: 800;
}

.rank-cover {
  display: block;
  width: 82px;
  aspect-ratio: 16 / 22;
  border-radius: 12px;
  overflow: hidden;
}

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

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.rank-content h2 a:hover {
  color: #6ee7b7;
}

.rank-content p {
  margin: 0 0 8px;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.86rem;
}

.rank-action {
  padding: 10px 16px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0 18px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16));
}

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

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 18px 54px rgba(16, 185, 129, 0.32);
  font-size: 2rem;
  transition: transform 0.2s ease;
}

.player-overlay:hover span {
  transform: scale(1.08);
}

.player-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-toolbar button {
  padding: 10px 18px;
}

.detail-info,
.side-card {
  padding: 24px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.detail-info h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.detail-info h2,
.side-card h2 {
  margin: 24px 0 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--soft);
}

.lead-text {
  font-size: 1.08rem;
  color: #e2e8f0 !important;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 16 / 22;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.cover-card h2 {
  margin-top: 0;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mini-list a:hover span {
  color: #6ee7b7;
}

.mini-list em {
  color: #64748b;
  font-style: normal;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 30px;
  padding: 48px 0 32px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
  color: var(--muted);
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  padding: 18px 0 30px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

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

.empty-state {
  padding: 42px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

@media (max-width: 1024px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

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

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

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

  .category-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
    gap: 12px;
  }

  .brand-text {
    font-size: 1.25rem;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 12%;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .category-strip {
    width: min(100% - 22px, 1180px);
    padding: 24px;
    margin-top: -24px;
  }

  .page-container,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

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

  .movie-card-body p,
  .card-tags {
    display: none;
  }

  .section-head,
  .rank-row,
  .inline-filter {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .rank-row {
    align-items: start;
  }

  .rank-cover {
    width: 100%;
    max-width: 160px;
  }

  .rank-action {
    justify-self: start;
  }

  .page-hero,
  .rank-panel,
  .soft-panel {
    padding: 24px;
    border-radius: 22px;
  }

  .detail-info,
  .side-card {
    padding: 18px;
  }
}

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

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.15rem;
  }
}
