:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #111827;
  --panel-soft: #1e293b;
  --text: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --line: rgba(148, 163, 184, 0.22);
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.13);
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

* {
  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(--text);
  background: #f1f5f9;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: white;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.34);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.32);
}

.logo-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-subtitle {
  display: block;
  margin-top: -3px;
  font-size: 12px;
  color: #cbd5e1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

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

.nav-links a:hover {
  color: #fbbf24;
}

.nav-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.nav-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  color: white;
  background: rgba(51, 65, 85, 0.9);
  padding: 10px 16px;
}

.nav-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.menu-button {
  display: none;
  border: 0;
  color: white;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(51, 65, 85, 0.9);
}

.mobile-menu {
  display: none;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: #e2e8f0;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: white;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.25), transparent 28%),
              linear-gradient(135deg, #020617 0%, #111827 48%, #0f172a 100%);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.22) 100%),
              linear-gradient(0deg, #0f172a 0%, transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 410px;
  gap: 54px;
  align-items: center;
  padding: 64px 0;
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 14px;
  color: white;
  background: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 18px;
  max-width: 760px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -1px;
}

.hero p {
  max-width: 690px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-ghost {
  color: white;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 480px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-card:hover img {
  transform: scale(1.05);
}

.hero-card-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: calc((100% - min(1200px, calc(100% - 32px))) / 2);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

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

.section {
  padding: 54px 0 0;
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.section-desc {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

.card {
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-wrap.wide {
  aspect-ratio: 16 / 9;
}

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

.card:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: white;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.poster-time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 8px;
  padding: 4px 8px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  color: #111827;
}

.card-title:hover {
  color: var(--brand-dark);
}

.card-text {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

.dark-band {
  margin-top: 54px;
  padding: 36px;
  border-radius: 28px;
  color: white;
  background: linear-gradient(120deg, #1e293b, #020617);
  box-shadow: var(--shadow);
}

.horizontal-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .card {
  min-width: 280px;
  scroll-snap-align: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

.rank-thumb {
  width: 86px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.page-hero {
  color: white;
  padding: 58px 0;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 30%),
              linear-gradient(135deg, #020617, #1e293b 58%, #0f172a);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.12;
}

.page-hero p {
  margin: 0;
  max-width: 780px;
  color: #cbd5e1;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  margin: 24px 0;
  font-size: 14px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  margin: 28px 0;
  background: #111827;
}

.search-panel select {
  color: #e2e8f0;
}

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

.player-card,
.info-card,
.related-card {
  border-radius: 24px;
  background: white;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.22));
  transition: opacity 0.25s ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--brand);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.38);
  font-size: 34px;
}

.player-note {
  padding: 14px 18px;
  color: #475569;
  font-size: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.info-card {
  padding: 24px;
}

.info-card h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
}

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-section {
  margin-top: 26px;
}

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

.detail-section p {
  margin: 0 0 14px;
  color: #334155;
}

.related-card {
  padding: 20px;
  margin-top: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 74px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0 26px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h3,
.footer-grid h4 {
  color: white;
  margin: 0 0 12px;
}

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-size: 13px;
}

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

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

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

  .hero-content,
  .movie-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 440px;
  }
}

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

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

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

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

  .rank-row {
    grid-template-columns: 42px 70px 1fr;
  }

  .rank-row .pill:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .logo-title {
    font-size: 17px;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding: 38px 0 72px;
  }

  .hero-card img {
    height: 360px;
  }

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

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

  .info-card h1 {
    font-size: 26px;
  }
}
