:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  --orange-500: #f97316;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  color: var(--white);
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.22);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--slate-300);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(245, 158, 11, 0.16);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search-input,
.filter-input,
.filter-select {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--slate-800);
  outline: none;
  padding: 12px 16px;
  min-width: 220px;
}

.global-search-button,
.primary-button,
.ghost-button,
.section-more {
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.global-search-button,
.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  padding: 12px 20px;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--slate-200);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 84px;
  max-width: 720px;
  color: var(--white);
  z-index: 3;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.14);
  font-weight: 800;
  font-size: 14px;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  font-size: clamp(34px, 6vw, 66px);
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  margin: 18px 0 0;
  color: var(--slate-200);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 22px 0 28px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--slate-100);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ghost-button,
.section-more {
  padding: 11px 18px;
  color: var(--amber-600);
  background: rgba(245, 158, 11, 0.12);
}

.hero-actions .ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(15, 23, 42, 0.5);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber-500);
}

.search-panel,
.page-shell,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.search-panel-inner,
.page-hero,
.content-section,
.detail-hero,
.player-section,
.detail-content,
.category-directory {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.search-panel-inner {
  padding: 34px;
}

.search-panel h2,
.section-heading h2,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.search-panel p {
  margin: 10px 0 22px;
  color: var(--slate-600);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-input {
  flex: 1 1 280px;
}

.content-section,
.category-directory {
  margin-top: 30px;
  padding: 32px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--slate-800);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-duration,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.74);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  top: 10px;
  bottom: auto;
  background: linear-gradient(135deg, var(--rose-500), var(--amber-500));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0;
  color: var(--slate-900);
  font-size: 16px;
  line-height: 1.5;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 12px;
}

.card-meta span:first-child {
  color: var(--amber-600);
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

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

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

.category-tile,
.category-card-large {
  display: flex;
  min-height: 136px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.44), transparent 30%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
}

.category-tile span,
.category-card-large h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card-large p {
  color: var(--slate-300);
  line-height: 1.65;
}

.page-hero {
  padding: 44px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.26), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero.slim h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.category-card-large span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-400);
  font-weight: 800;
}

.empty-state {
  display: none;
  margin: 24px 0 0;
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  color: var(--slate-500);
  background: var(--slate-100);
}

.detail-shell {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  padding: 32px;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.42);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

.tag-row.large span {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-400);
}

.player-section,
.detail-content {
  margin-top: 28px;
  padding: 32px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: var(--radius-xl);
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.36);
  font-size: 38px;
}

.detail-content {
  line-height: 1.88;
}

.detail-content p {
  margin: 12px 0 24px;
  color: var(--slate-700);
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.info-table div {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--slate-100);
}

.info-table strong {
  display: block;
  color: var(--slate-500);
  font-size: 13px;
}

.info-table span {
  display: block;
  margin-top: 4px;
  color: var(--slate-900);
  font-weight: 800;
}

.movie-card.compact .card-body h3 {
  min-height: 0;
}

.site-footer {
  margin-top: 36px;
  background: var(--slate-950);
  color: var(--slate-300);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  color: var(--white);
  font-size: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
}

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

.footer-links a {
  color: var(--slate-300);
}

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

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

  .header-search {
    display: none;
  }
}

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

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

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

  .hero-carousel {
    height: 76vh;
    min-height: 620px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .page-shell,
  .detail-shell {
    padding: 28px 16px;
  }

  .search-panel-inner,
  .content-section,
  .category-directory,
  .detail-hero,
  .player-section,
  .detail-content,
  .page-hero {
    padding: 22px;
  }

  .movie-grid,
  .listing-grid,
  .category-grid,
  .category-grid.large,
  .info-table,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    min-height: 320px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: 0;
  }
}
