
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-strong: #fbbf24;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.1), transparent 34rem),
    var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 74px;
  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.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.24);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 36vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
}

.top-search input,
.mobile-search input,
.quick-search-card input,
.filter-search input,
.filter-selects select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.top-search input {
  padding: 10px 14px;
}

.top-search button,
.mobile-search button,
.quick-search-card button,
.filter-search button {
  flex: 0 0 auto;
  border: 0;
  color: #111827;
  background: var(--accent);
  font-weight: 800;
  padding: 10px 16px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  padding: 14px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.mobile-link {
  padding: 11px 14px;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mobile-search input {
  padding: 10px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  height: 68vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.72);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 40%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.1) 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 54px;
  padding-top: 60px;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-one-line,
.page-hero p,
.detail-one-line {
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-one-line {
  max-width: 720px;
  margin: 22px 0 0;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.inline-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 20px 42px rgba(245, 158, 11, 0.18);
}

.ghost-button,
.inline-button,
.section-more {
  min-height: 42px;
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

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

.hero-poster {
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: max(18px, calc((100vw - 1280px) / 2));
}

.hero-next {
  right: max(18px, calc((100vw - 1280px) / 2));
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  width: 32px;
  background: var(--accent);
}

.quick-search-section,
.content-section,
.page-main,
.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-section {
  margin-top: -58px;
  position: relative;
  z-index: 8;
}

.quick-search-card,
.filter-panel,
.story-card,
.rank-panel,
.category-overview-card,
.page-hero,
.detail-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.quick-search-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
}

.quick-search-card form {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.62);
}

.quick-search-card input {
  padding: 14px 18px;
}

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

.content-section {
  margin-top: 72px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-head span,
.story-card p,
.card-body p,
.rank-item p,
.category-overview-card p,
.site-footer p {
  color: var(--muted);
}

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

.category-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.category-card:hover img {
  transform: scale(1.05);
  opacity: 0.48;
}

.category-card div {
  position: relative;
  padding: 22px;
}

.category-card h3,
.movie-card h3,
.rank-item h3,
.category-overview-card h2,
.story-card h2 {
  margin: 0;
  line-height: 1.24;
}

.category-card p {
  color: var(--muted-strong);
}

.category-card span {
  display: inline-flex;
  color: var(--accent-strong);
  font-weight: 800;
}

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

.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

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

.card-meta span {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

.movie-card h3 {
  min-height: 44px;
  font-size: 16px;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
  color: var(--accent-strong);
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 9px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.tag-row span {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.small-head {
  margin-bottom: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(2, 6, 23, 0.34);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

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

.rank-cover span {
  position: absolute;
  left: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #111827;
  background: var(--accent);
  font-weight: 900;
}

.rank-item p {
  display: -webkit-box;
  margin: 7px 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.page-main {
  padding-top: 32px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: grid;
  align-items: center;
  padding: 44px;
}

.compact-hero {
  min-height: 240px;
}

.page-hero p {
  max-width: 820px;
}

.category-hero {
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.category-hero img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.filter-panel {
  margin-bottom: 22px;
  padding: 18px;
}

.filter-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
}

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

.filter-selects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.filter-selects select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0f172a;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--muted);
}

.filter-count span {
  color: var(--accent-strong);
  font-weight: 900;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.detail-main {
  max-width: 1180px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--accent-strong);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-meta {
  margin: 22px 0;
}

.large-tags span {
  min-height: 30px;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.player-section {
  scroll-margin-top: 96px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #111827;
  background: var(--accent);
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.28);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 26px;
}

.story-card p:last-child {
  font-size: 16px;
}

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

.sitemap-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.sitemap-list a {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.62);
}

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

.site-footer {
  margin-top: 88px;
  padding: 32px 0 46px;
  border-top: 1px solid var(--line);
}

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

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

.footer-links a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted-strong);
}

.footer-links span {
  color: var(--accent-strong);
}

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

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

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 820px) {
  .hero-carousel {
    min-height: 760px;
    height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-bottom: 70px;
  }

  .hero-poster {
    width: min(240px, 70vw);
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-card,
  .detail-hero,
  .category-hero,
  .category-overview-card,
  .detail-content,
  .rank-page .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .page-hero,
  .detail-hero {
    padding: 22px;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .quick-search-section,
  .content-section,
  .page-main,
  .site-footer {
    width: min(100% - 22px, 1280px);
  }

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

  .hero-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .quick-search-card form,
  .filter-search {
    border-radius: 18px;
    flex-direction: column;
  }

  .quick-search-card button,
  .filter-search button {
    min-height: 44px;
  }

  .movie-grid,
  .tight-grid,
  .library-grid,
  .filter-selects {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 76px 1fr;
  }
}
