:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --emerald: #059669;
  --emerald-bright: #10b981;
  --teal: #0d9488;
  --orange: #f97316;
  --blue: #2563eb;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-icon,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-bright), var(--teal));
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 24px;
  line-height: 1;
}

.brand-text small {
  color: #94a3b8;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links .nav-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.mobile-menu a {
  display: block;
  color: #cbd5e1;
  padding: 12px 4px;
  font-weight: 600;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 1180px;
}

.hero-content > * {
  max-width: 720px;
}

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

.hero-kicker span,
.detail-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-kicker span:first-child,
.detail-labels span:first-child {
  background: var(--emerald-bright);
  color: #ffffff;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: #065f46;
  background: #d1fae5;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero .tag-pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

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

.btn-primary,
.home-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 25px rgba(5, 150, 105, 0.24);
  border: 0;
}

.btn-primary:hover,
.home-search button:hover,
.btn-ghost:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.block {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.home-search-band,
.page-section,
.detail-wrap,
.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  margin-top: -42px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-search-band h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.home-search-band p {
  margin: 0;
  color: var(--muted);
}

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

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
  color: var(--text);
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.page-section {
  padding: 58px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--emerald);
  font-weight: 800;
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.15);
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #115e59);
}

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

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

.movie-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.72));
}

.movie-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
}

.two-col-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 38px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: auto 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 900;
}

.compact-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.compact-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-info span,
.compact-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-card {
  display: block;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.18);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #0d9488);
}

.category-card span {
  display: block;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card p,
.category-card em {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
  font-style: normal;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.36), transparent 32%), linear-gradient(135deg, #0f172a, #115e59);
}

.page-hero.small {
  padding: 62px 0;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #d1fae5;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 160px;
  background: #0f172a;
}

.category-covers img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
}

.category-overview-body p {
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-body ul {
  margin: 14px 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-result {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 14px;
  color: #065f46;
  background: #d1fae5;
  font-weight: 900;
}

.detail-wrap {
  padding-top: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--emerald);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-card,
.poster-card,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-layer span {
  width: 76px;
  height: 76px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
  font-size: 30px;
}

.play-layer strong {
  font-size: 20px;
}

.video-shell.is-playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(185, 28, 28, 0.88);
  text-align: center;
  font-weight: 700;
}

.player-message:not(:empty) {
  display: block;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.lead-text {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.detail-card p {
  color: #374151;
  line-height: 1.95;
}

.tag-row {
  margin-top: 16px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.poster-card,
.side-card {
  padding: 20px;
}

.poster-card .poster-img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #0f172a;
}

.poster-card h2,
.side-card h2 {
  margin: 16px 0;
  font-size: 22px;
}

.poster-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}

.poster-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.poster-card li strong {
  color: var(--text);
  text-align: right;
}

.ranking-list.mini .compact-card {
  grid-template-columns: auto 82px 1fr;
  padding: 8px;
}

.ranking-list.mini .compact-info em {
  display: none;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: #94a3b8;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1024px) {
  .nav-links {
    gap: 14px;
    font-size: 14px;
  }

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

  .two-col-section,
  .detail-grid,
  .home-search-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .filter-panel .search-box,
  .filter-result {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-nav {
    min-height: 66px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .brand-text strong {
    font-size: 20px;
  }

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

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 82px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-overview-grid,
  .ranking-list.wide,
  .category-grid.compact,
  .detail-side,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: auto 96px 1fr;
  }

  .page-hero {
    padding: 50px 0;
  }

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 36px;
  }

  .movie-grid {
    gap: 16px;
  }

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

  .compact-card {
    grid-template-columns: 76px 1fr;
  }

  .compact-card .rank-num {
    display: none;
  }

  .compact-thumb {
    width: 76px;
  }

  .footer-grid {
    gap: 22px;
  }
}
