:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.92);
  --purple: #581c87;
  --purple-soft: rgba(88, 28, 135, 0.36);
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(168, 85, 247, 0.28);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.12), transparent 25%),
    radial-gradient(circle at 92% 12%, rgba(147, 51, 234, 0.16), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #1e1b4b;
  font-size: 18px;
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.36);
}

.brand-copy {
  display: grid;
  line-height: 1.12;
}

.brand-copy strong {
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-copy small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--amber-light);
}

.top-search {
  position: relative;
  width: min(270px, 24vw);
  flex-shrink: 0;
}

.top-search input,
.page-search input {
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  outline: 0;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 11px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.top-search input:focus,
.page-search input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: none;
  width: min(420px, calc(100vw - 32px));
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  padding: 10px;
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  border-radius: 14px;
  padding: 8px;
  background: rgba(30, 41, 59, 0.7);
  transition: background 0.2s ease;
}

.search-item:hover {
  background: rgba(88, 28, 135, 0.42);
}

.search-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #312e81, #7c2d12);
}

.search-item strong {
  display: block;
  color: #fde68a;
  line-height: 1.35;
}

.search-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.96);
  padding: 12px 16px 18px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

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

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  background: linear-gradient(135deg, #111827, #581c87 52%, #7c2d12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.16) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.78));
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 78px;
}

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

.hero-kicker,
.section-head span,
.page-hero span,
.player-heading span,
.category-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.home-title {
  margin: 12px 0 6px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #fde68a;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.meta-line span {
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  background: rgba(88, 28, 135, 0.3);
  color: #dbeafe;
  padding: 6px 10px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 0 24px;
  background: linear-gradient(90deg, var(--amber), #d97706);
  color: #fff;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
}

.ghost-btn,
.section-link,
.rank-action {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  color: #fde68a;
  padding: 0 18px;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.rank-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 55px rgba(245, 158, 11, 0.2);
}

.hero-nav {
  position: absolute;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-nav.prev {
  left: 24px;
}

.hero-nav.next {
  right: 24px;
}

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--amber-light);
}

.section-block {
  padding: 64px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.player-heading h2,
.detail-article h2 {
  margin: 8px 0 10px;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 930;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-line,
.detail-article p,
.footer-brand p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.82));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.64);
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.13);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #312e81, #581c87 54%, #7c2d12);
}

.poster-link img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.image-missing {
  opacity: 0;
}

.poster-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 56%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.play-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 54px;
  opacity: 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
  transform: scale(0.82);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-region {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  border-radius: 10px;
  background: rgba(88, 28, 135, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.card-body {
  padding: 16px;
}

.card-body b {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-light);
  font-size: 22px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fef3c7;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--amber-light);
}

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

.meta-line {
  gap: 7px;
}

.meta-line span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.tag-row span {
  border-radius: 999px;
  background: rgba(88, 28, 135, 0.35);
  color: #d8b4fe;
  font-size: 12px;
  padding: 5px 8px;
}

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

.category-card,
.category-overview-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(88, 28, 135, 0.44), rgba(15, 23, 42, 0.86));
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-4px);
}

.category-card a,
.category-overview-card a {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
}

.category-card h3,
.category-overview-card h2 {
  margin: 12px 0 10px;
  color: #fde68a;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.sample-links,
.category-samples {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.sample-links a,
.category-samples a {
  color: #c4b5fd;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 62px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(168, 85, 247, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
}

.page-hero .site-container {
  max-width: 960px;
}

.page-search {
  max-width: 620px;
  margin-top: 24px;
}

.empty-state {
  display: none;
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  padding: 28px;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 90px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.58);
  transform: translateX(4px);
}

.rank-num {
  color: var(--amber-light);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  width: 90px;
  height: 120px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #312e81, #7c2d12);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  color: #fef3c7;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #312e81, #7c2d12);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-copy h1 {
  max-width: 900px;
  font-size: clamp(36px, 5.8vw, 66px);
}

.detail-line {
  max-width: 820px;
  font-size: 18px;
}

.detail-meta {
  margin-top: 24px;
}

.detail-tags {
  margin-top: 18px;
}

.player-heading {
  margin-bottom: 20px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.24), rgba(2, 6, 23, 0.68) 45%, rgba(0, 0, 0, 0.88) 100%);
  color: #fff;
  cursor: pointer;
}

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

.player-play {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #111827;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.content-section {
  padding-top: 44px;
}

.detail-article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 30px;
}

.detail-article h2 {
  font-size: 28px;
}

.detail-article p + h2 {
  margin-top: 26px;
}

.site-footer {
  margin-top: 74px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 46px 0;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: #fde68a;
  font-size: 18px;
}

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

.footer-grid a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(168, 85, 247, 0.18);
  color: #64748b;
  padding: 18px 0;
}

.footer-bottom button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(88, 28, 135, 0.3);
  color: #fde68a;
  cursor: pointer;
  padding: 9px 14px;
}

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

  .top-search {
    margin-left: auto;
    width: min(340px, 38vw);
  }

  .menu-toggle {
    display: block;
    margin-left: 0;
  }

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 0;
  }

  .top-search {
    order: 3;
    width: 100%;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    padding-bottom: 94px;
  }

  .hero-nav {
    top: auto;
    bottom: 28px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .hero-nav.prev {
    left: 18px;
  }

  .hero-nav.next {
    right: 18px;
  }

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

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

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-action {
    display: none;
  }

  .rank-thumb {
    width: 72px;
    height: 96px;
  }

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

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

@media (max-width: 560px) {
  .brand-copy strong {
    font-size: 20px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .home-title,
  .hero h2,
  .detail-copy h1 {
    letter-spacing: -0.02em;
  }

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

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

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

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

  .rank-thumb {
    display: none;
  }

  .detail-article {
    padding: 22px;
  }
}
