* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --rose-500: #f43f5e;
  --cyan-500: #06b6d4;
  --green-500: #22c55e;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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: 60;
  color: white;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: 0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--slate-300);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--slate-300);
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--slate-200);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.25s ease;
}

.icon-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.menu-button {
  display: none;
}

.quick-search,
.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.quick-search form {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  outline: 0;
  color: white;
  background: rgba(15, 23, 42, 0.9);
}

.quick-search button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: var(--slate-950);
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
}

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

.hero {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  color: white;
  overflow: hidden;
  background: linear-gradient(120deg, var(--slate-950), #78350f, var(--slate-950));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.08) 35px, rgba(255, 255, 255, 0.08) 70px);
  pointer-events: none;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 32%, rgba(245, 158, 11, 0.25), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.3)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px 0 120px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber-400);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 900px;
  color: transparent;
  background: linear-gradient(90deg, var(--amber-400), #fff7ed, var(--amber-400));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero h2 {
  margin: 16px 0 0;
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.hero p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--slate-200);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
}

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

.hero-tags span,
.detail-tags span,
.movie-badges span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: rgba(245, 158, 11, 0.85);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.active {
  background: var(--amber-400);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

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

.section-title.compact {
  align-items: center;
}

.section-title p,
.panel-title p {
  margin: 0 0 6px;
  color: var(--amber-600);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-title h2,
.panel-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-title a {
  color: var(--amber-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

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

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.7s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 55%);
}

.play-dot {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 56px;
  height: 56px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--amber-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: scale(0.88);
  transition: 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: scale(1);
}

.rank-mark {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--slate-950);
  background: var(--amber-400);
  font-size: 0.76rem;
  font-weight: 900;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 12px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-info p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.65;
  font-size: 0.92rem;
}

.movie-badges span {
  color: var(--slate-700);
  background: var(--slate-100);
}

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

.category-tile,
.category-card-large a {
  display: block;
  min-height: 190px;
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-5px) scale(1.01);
}

.category-tile span,
.category-copy span {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
}

.category-tile strong,
.category-copy h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.category-tile small,
.category-copy p {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.category-tone-0 { background: linear-gradient(135deg, #f97316, #b91c1c); }
.category-tone-1 { background: linear-gradient(135deg, #2563eb, #0891b2); }
.category-tone-2 { background: linear-gradient(135deg, #db2777, #be123c); }
.category-tone-3 { background: linear-gradient(135deg, #16a34a, #047857); }
.category-tone-4 { background: linear-gradient(135deg, #7c3aed, #4338ca); }
.category-tone-5 { background: linear-gradient(135deg, #ca8a04, #c2410c); }

.category-card-large a {
  min-height: 310px;
  padding: 0;
  background: var(--slate-900);
}

.category-covers {
  height: 170px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  opacity: 0.7;
}

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

.category-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.2));
}

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

.ranking-panel {
  position: sticky;
  top: 104px;
  border-radius: var(--radius-xl);
  padding: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.rank-item {
  display: grid;
  grid-template-columns: 40px 58px 1fr;
  grid-template-areas: "num image title" "num image meta";
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-50);
  transition: 0.25s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.rank-number {
  grid-area: num;
  color: var(--amber-600);
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-item img {
  grid-area: image;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

.rank-title {
  grid-area: title;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  grid-area: meta;
  color: var(--slate-500);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
  color: white;
  background: var(--slate-900);
}

.page-hero {
  color: white;
  padding: 90px max(16px, calc((100vw - 1180px) / 2)) 80px;
  background: radial-gradient(circle at 74% 18%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(120deg, var(--slate-950), var(--slate-800));
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px 150px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  color: var(--slate-900);
  background: var(--slate-50);
}

.detail-hero {
  position: relative;
  color: white;
  overflow: hidden;
  background: var(--slate-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.82)), radial-gradient(circle at 75% 18%, rgba(245, 158, 11, 0.28), transparent 36%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--slate-300);
  margin-bottom: 34px;
}

.breadcrumb a {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--slate-800);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  max-width: 840px;
}

.detail-one-line {
  max-width: 820px;
  color: var(--slate-200);
  font-size: 1.18rem;
  line-height: 1.75;
}

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

.detail-meta span {
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--slate-200);
  background: rgba(255, 255, 255, 0.1);
}

.player-section {
  padding-bottom: 28px;
}

.player-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-wrap video,
.player-overlay,
.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-wrap video {
  z-index: 1;
  background: black;
}

.player-overlay {
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.72);
}

.player-overlay[hidden] {
  display: none;
}

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

.player-overlay button {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: var(--slate-950);
  cursor: pointer;
  background: linear-gradient(135deg, #fff7ed, var(--amber-400));
  box-shadow: 0 0 38px rgba(245, 158, 11, 0.5);
  font-size: 2rem;
  transition: 0.25s ease;
}

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

.article-section {
  padding-top: 18px;
  padding-bottom: 18px;
}

.detail-article {
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 46px);
  background: white;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  margin: 0;
  color: var(--slate-700);
  font-size: 1.06rem;
  line-height: 1.9;
}

.site-footer {
  color: var(--slate-300);
  background: var(--slate-950);
  padding: 42px 0 30px;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 1.2rem;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  color: var(--slate-500);
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

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

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

  .header-inner {
    height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 660px;
  }

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

  .section-title,
  .footer-inner,
  .detail-layout {
    display: block;
  }

  .section-title a {
    display: inline-flex;
    margin-top: 12px;
  }

  .detail-poster {
    max-width: 300px;
    margin-bottom: 28px;
  }

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

@media (max-width: 560px) {
  .hero-actions,
  .page-actions {
    display: grid;
  }

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

  .quick-search form {
    display: grid;
  }

  .quick-search button {
    min-height: 46px;
  }

  .player-overlay button {
    width: 68px;
    height: 68px;
  }
}
