:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: #1e293b;
  --panel-strong: #243249;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --shadow: rgba(245, 158, 11, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.97));
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--amber-soft));
  box-shadow: 0 0 24px var(--shadow);
  font-size: 15px;
}

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

.brand-text strong {
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.04em;
}

.brand-text em {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-bar input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button {
  border: 0;
  cursor: pointer;
  color: #111827;
  background: var(--amber);
  padding: 10px 13px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #e2e8f0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #111827;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 11px 12px;
  color: #cbd5e1;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.65);
}

.hero {
  position: relative;
  height: clamp(430px, 58vw, 640px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 3%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.12)), linear-gradient(90deg, rgba(2, 6, 23, 0.78), transparent 72%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: clamp(64px, 9vw, 96px);
}

.hero-tags,
.card-tags,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip,
.tag,
.detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 12px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  color: #111827;
  background: var(--amber);
  box-shadow: 0 14px 34px var(--shadow);
}

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

.primary-btn:hover {
  background: var(--amber-soft);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.25);
  background: rgba(15, 23, 42, 0.48);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.54);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.82);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 20px;
  transform: translateY(-50%);
}

.hero-next {
  right: 20px;
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -26px auto 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.quick-strip a {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}

.section-block {
  padding: clamp(34px, 5vw, 64px) 0;
}

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

.section-title h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

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

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
}

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

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.movie-row,
.ranking-card,
.story-panel,
.side-panel,
.category-tile {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.movie-row:hover,
.category-tile:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.12);
}

.poster,
.row-poster,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #020617;
}

.poster img,
.row-poster img,
.rank-cover img,
.category-tile img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.movie-row:hover img,
.category-tile:hover img,
.ranking-card:hover img {
  transform: scale(1.08);
}

.movie-card.large .poster img {
  aspect-ratio: 16 / 12;
}

.year-badge,
.row-poster span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-content h2,
.row-copy h2,
.ranking-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-content h2 a:hover,
.row-copy h2 a:hover,
.ranking-card h2 a:hover {
  color: var(--amber);
}

.card-content p,
.row-copy p,
.ranking-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  min-height: 128px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-row .row-poster img {
  height: 100%;
  aspect-ratio: auto;
}

.row-copy {
  padding: 16px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.2));
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  margin: 8px 0 0;
  line-height: 1.65;
  font-size: 14px;
}

.ranking-section {
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 13px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

.ranking-list span,
.rank-index {
  color: var(--amber);
  font-weight: 900;
  font-size: 18px;
}

.ranking-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.page-hero {
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b 58%, #111827);
  border-bottom: 1px solid rgba(51, 65, 85, 0.78);
}

.page-hero.compact > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 86px) 0;
}

.page-hero span,
.detail-kicker {
  display: inline-flex;
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.page-hero h1,
.detail-copy h1 {
  margin: 12px 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.filter-bar {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.82);
  background: rgba(15, 23, 42, 0.7);
}

.filter-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
}

.filter-chips button {
  min-height: 34px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  padding: 0 14px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.75);
  cursor: pointer;
  font-weight: 750;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #111827;
  background: var(--amber);
  border-color: var(--amber);
}

.ranking-cards {
  display: grid;
  gap: 14px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 74px 150px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rank-index {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 88px;
}

.rank-cover img {
  border-radius: 12px;
}

.ranking-card span {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  padding: 24px 0 44px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: #020617;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.05), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--amber);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
  font-size: 30px;
  padding-left: 5px;
}

.detail-copy {
  align-self: center;
  padding: 28px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(51, 65, 85, 0.76);
}

.detail-line {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 17px;
}

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

.detail-meta span {
  padding: 6px 10px;
  border-radius: 10px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 13px;
}

.detail-btn {
  margin-top: 22px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.story-panel,
.side-panel {
  padding: 24px;
}

.story-panel h2,
.side-panel h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
}

.story-panel p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  margin: 0;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  color: #e2e8f0;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  background: #0b1120;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-about p,
.site-footer a,
.site-footer li {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

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

@media (max-width: 1080px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .header-inner {
    height: 66px;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding-bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-strip,
  .movie-grid.four,
  .movie-grid.three,
  .category-grid,
  .ranking-list,
  .ranking-card,
  .movie-row {
    grid-template-columns: 1fr;
  }

  .quick-strip {
    margin-top: 18px;
  }

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

  .row-poster img {
    aspect-ratio: 16 / 10;
  }

  .ranking-card {
    gap: 10px;
  }

  .rank-index {
    min-height: auto;
  }

  .detail-copy,
  .story-panel,
  .side-panel {
    padding: 20px;
  }

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