
:root {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(148, 163, 184, 0.22);
  --brand-1: #f59e0b;
  --brand-2: #fb7185;
  --brand-3: #7c3aed;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.10), transparent 28%),
    linear-gradient(180deg, #fff 0%, #f8fafc 52%, #eef2ff 100%);
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

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

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
}
.brand strong { font-size: 1.08rem; }
.brand small { display: block; color: var(--muted); font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(245, 158, 11, 0.12);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-pill {
  width: min(360px, 44vw);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.search-pill input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
}
.search-pill svg { flex-shrink: 0; color: #94a3b8; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 34px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 420px; height: 420px; border-radius: 50%;
  transform: translate(-20%, -28%);
  background: radial-gradient(circle, rgba(245,158,11,.22), rgba(245,158,11,0));
}
.hero::after {
  content: "";
  position: absolute; right: 0; top: 0;
  width: 420px; height: 420px; border-radius: 50%;
  transform: translate(35%, -30%);
  background: radial-gradient(circle, rgba(124,58,237,.16), rgba(124,58,237,0));
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}
.hero-copy,
.hero-panel,
.section-card,
.info-card,
.category-card,
.movie-card,
.rank-row,
.detail-card,
.player-card {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.hero-copy {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.80)),
    linear-gradient(135deg, rgba(245,158,11,0.20), rgba(124,58,237,0.14));
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  margin: 0;
  max-width: 62ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), #fb923c 50%, var(--brand-2));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.02); }
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fff; transform: translateY(-1px); }

.hero-panel {
  padding: 20px;
  display: grid;
  gap: 16px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(15,23,42,0.94), rgba(30,41,59,0.88)),
    linear-gradient(135deg, rgba(245,158,11,0.28), rgba(124,58,237,0.12));
  color: #e2e8f0;
}
.hero-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-panel__title { font-size: 1.1rem; font-weight: 900; }
.hero-panel__sub { color: rgba(226,232,240,.78); font-size: 0.92rem; }
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.carousel::-webkit-scrollbar { height: 10px; }
.carousel::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 999px; }
.carousel > * { scroll-snap-align: start; }

.section {
  padding: 18px 0 44px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.03em;
}
.section-desc { margin: 6px 0 0; color: var(--muted); }

.section-card,
.info-card,
.detail-card,
.player-card {
  padding: 22px;
}

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

.category-card,
.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.category-card:hover,
.movie-card:hover,
.rank-row:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(15,23,42,0.14); }
.category-card,
.movie-card,
.rank-row { transition: 0.22s ease; }

.category-cover,
.movie-cover,
.hero-feature,
.rank-thumb,
.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 6px);
  background: linear-gradient(135deg, var(--c1, #7c3aed), var(--c2, #fb7185));
  color: #fff;
}
.category-cover { min-height: 180px; padding: 18px; display: flex; flex-direction: column; justify-content: end; gap: 10px; }
.movie-cover { min-height: 220px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.rank-thumb { width: 104px; min-height: 132px; flex-shrink: 0; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.detail-poster { min-height: 380px; padding: 24px; display: flex; flex-direction: column; justify-content: end; gap: 14px; }

.cover-chip,
.poster-chip,
.badge,
.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 800;
}
.cover-chip,
.poster-chip {
  padding: 7px 11px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
}
.badge { padding: 6px 10px; background: rgba(255,255,255,0.12); }
.tag {
  padding: 6px 10px;
  background: rgba(148,163,184,0.12);
  color: var(--muted);
  font-size: 0.85rem;
}

.cover-title,
.movie-title,
.rank-title,
.detail-title {
  margin: 0;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.cover-title { font-size: 1.3rem; }
.movie-title { font-size: 1rem; }
.rank-title { font-size: 1rem; }
.detail-title { font-size: clamp(2rem, 3vw, 3.2rem); }

.cover-meta,
.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,0.84);
}
.movie-body,
.category-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.movie-body p,
.category-body p,
.detail-text,
.rank-row p,
.small-muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.movie-body p { font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .tag { background: rgba(245,158,11,0.10); color: #92400e; }

.subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.info-card h3,
.detail-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.info-list {
  display: grid;
  gap: 12px;
}
.info-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(148,163,184,0.24);
}
.info-item:last-child { border-bottom: 0; padding-bottom: 0; }
.info-item span { color: var(--muted); }
.info-item strong { text-align: right; }

.detail-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 18px;
  align-items: start;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.breadcrumbs a { color: #c2410c; }

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 4px);
  background: #0f172a;
  box-shadow: var(--shadow);
}
.player-wrap video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15,23,42,0.22), rgba(15,23,42,0.46));
  border: 0;
  color: #fff;
  cursor: pointer;
}
.video-overlay .play {
  width: 82px; height: 82px; border-radius: 999px;
  background: rgba(255,255,255,0.92);
  display: grid; place-items: center;
  box-shadow: 0 20px 44px rgba(0,0,0,.28);
}
.video-overlay svg { color: #f97316; margin-left: 5px; }

.rank-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
}
.rank-row__content {
  flex: 1;
  display: grid;
  gap: 8px;
}
.rank-no {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  flex-shrink: 0;
}
.rank-row__title {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 900;
}
.rank-row__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.rank-row__meta .tag { background: rgba(245,158,11,0.10); color: #92400e; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}
.filter-btn,
.sort-select {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
}
.filter-btn.active { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,113,133,0.12)); border-color: rgba(245,158,11,0.25); }
.sort-select { padding-right: 36px; }

.footer {
  margin-top: 44px;
  padding: 28px 0 52px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 18px;
}
.footer h4 { margin: 0 0 12px; color: var(--text); }
.footer a { color: var(--muted); }
.footer a:hover { color: #c2410c; }
.footer-note { margin-top: 18px; font-size: 0.95rem; }

.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  .search-pill { width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { min-height: unset; }
  .subgrid { grid-template-columns: 1fr; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { width: min(var(--container), calc(100% - 24px)); }
  .nav-links { gap: 8px; }
  .nav-links a { padding: 8px 10px; }
  .hero { padding-top: 30px; }
  .hero-copy { padding: 22px; }
  .hero-panel { padding: 16px; }
  .movie-grid, .category-grid { grid-template-columns: 1fr; }
  .rank-row { flex-direction: column; }
  .rank-thumb { width: 100%; min-height: 150px; }
}
