:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-2: #1f1f1f;
  --line: #2a2a2a;
  --muted: #a3a3a3;
  --soft: #d4d4d4;
  --text: #f5f5f5;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --shadow: 0 24px 80px rgba(245, 158, 11, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-size: 14px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  padding: 9px 15px;
  border-radius: 10px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.25s, background 0.25s, transform 0.25s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent);
  color: #151515;
  transform: translateY(-1px);
}

.menu-toggle,
.mobile-nav {
  display: none;
}

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

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

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

.hero-bg,
.hero-layer {
  position: absolute;
  inset: 0;
}

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

.hero-layer {
  background:
    radial-gradient(circle at 22% 30%, rgba(245, 158, 11, 0.32), transparent 34%),
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.76) 32%, rgba(0, 0, 0, 0.28) 67%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(0deg, #0a0a0a 0%, transparent 38%);
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #141414;
  font-size: 13px;
  font-weight: 800;
}

.tag-row span {
  background: rgba(245, 158, 11, 0.13);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.tag-row.large span {
  padding: 7px 12px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--soft);
  font-size: 20px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.24s, background 0.24s, border-color 0.24s;
}

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

.btn.primary {
  background: var(--accent);
  color: #151515;
}

.btn.primary:hover {
  background: var(--accent-2);
}

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

.btn.full {
  width: 100%;
  margin-top: 16px;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

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

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

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

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

.content-section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0;
}

.first-section {
  padding-top: 72px;
}

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

.section-head h2,
.page-hero h1,
.detail-article h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
}

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

.section-head a,
.back-link,
.detail-meta a {
  color: var(--accent);
  font-weight: 800;
}

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

.featured-grid .movie-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 0.28s, border-color 0.28s, box-shadow 0.28s;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

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

.play-dot,
.rank-badge,
.mini-rank {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #141414;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

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

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: var(--accent);
  color: #111;
}

.movie-info {
  padding: 16px;
}

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

.movie-info h3 a:hover {
  color: var(--accent);
}

.movie-info p {
  min-height: 3.2em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  margin-top: 14px;
  gap: 8px;
  color: #737373;
  font-size: 12px;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.rail .movie-card {
  scroll-snap-align: start;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.24s, transform 0.24s;
}

.mini-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.mini-thumb {
  position: relative;
  width: 112px;
  height: 70px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

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

.mini-rank {
  top: 5px;
  left: 5px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  background: var(--accent);
  color: #111;
  font-size: 12px;
}

.mini-body {
  min-width: 0;
}

.mini-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-body em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.category-tile,
.category-card-link {
  display: block;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--panel), #111 58%, rgba(245, 158, 11, 0.14));
  transition: border-color 0.24s, transform 0.24s;
}

.category-tile:hover,
.category-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.category-tile strong,
.category-card h2 {
  display: block;
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
}

.category-tile span,
.category-card p {
  color: var(--muted);
  font-size: 14px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 66px 0 28px;
}

.page-hero.slim {
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
}

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

.category-card-link {
  min-height: 260px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-covers img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
}

.detail-layout {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.detail-primary {
  min-width: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.poster-play.is-hidden {
  display: none;
}

.detail-article,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.detail-article h1 {
  margin-top: 18px;
}

.detail-meta {
  margin: 14px 0 28px;
  color: var(--muted);
}

.detail-meta span:not(:last-child)::after,
.detail-meta a::after {
  content: "·";
  margin-left: 12px;
  color: #555;
}

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

.detail-article h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-article p {
  margin: 0 0 14px;
  color: var(--soft);
}

.lead-text {
  color: #fff !important;
  font-size: 18px;
}

.detail-side {
  min-width: 0;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

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

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: #111;
}

.footer-grid {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.site-footer p,
.site-footer a,
.copyright {
  color: var(--muted);
  font-size: 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--accent);
}

.copyright {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    color: #fff;
    font-size: 22px;
  }

  .mobile-nav {
    padding: 10px 24px 18px;
    border-top: 1px solid var(--line);
    background: #111;
  }

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

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

  .hero-content {
    width: min(100% - 32px, 1280px);
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-hero,
  .detail-layout,
  .footer-grid,
  .copyright {
    width: min(100% - 32px, 1280px);
  }

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

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

  .featured-grid .movie-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }

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

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