
:root {
  --bg: #08111f;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #97a3b9;
  --accent: #60a5fa;
  --accent-2: #22c55e;
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
  --radius: 24px;
  --radius-sm: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 30%),
    linear-gradient(180deg, #040814 0%, #08111f 35%, #0b1324 100%);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
button, input { font: inherit; }
.container { width: min(1320px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 28px 0 10px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.section-head h2, .section-head h1 { margin: 0; font-size: clamp(22px, 2.5vw, 34px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-more { color: #b7d2ff; border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.03); }

.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(20px);
  background: rgba(5, 10, 20, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.header-inner {
  min-height: 76px; display: grid; align-items: center;
  grid-template-columns: auto auto 1fr auto;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 16px;
  background: linear-gradient(135deg, #60a5fa, #22c55e);
  color: white; font-weight: 800; letter-spacing: .06em;
  box-shadow: 0 12px 30px rgba(96, 165, 250, .35);
}
.brand-text { font-size: 18px; font-weight: 800; letter-spacing: .03em; }
.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a {
  padding: 10px 14px; border-radius: 999px; color: var(--muted);
  border: 1px solid transparent;
}
.site-nav a.active, .site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); border-color: var(--line); }
.site-search {
  display: flex; align-items: center; gap: 8px; justify-self: end;
  width: min(360px, 100%);
}
.site-search input {
  flex: 1; min-width: 0;
  padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text);
}
.site-search button, .btn, .btn-ghost, .btn-accent, .chip, .play-btn {
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
}
.site-search button, .btn, .btn-accent {
  padding: 12px 18px; background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white; box-shadow: 0 12px 30px rgba(59, 130, 246, 0.28);
}
.btn-ghost {
  padding: 12px 18px; background: rgba(255,255,255,0.05); color: var(--text); border-color: var(--line);
}
.btn-accent { display: inline-flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.nav-toggle span { display: block; height: 2px; width: 18px; margin: 4px auto; background: white; }

.hero {
  padding: 24px 0 14px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 18px;
  align-items: stretch;
}
.hero-carousel, .hero-side {
  position: relative; min-height: 620px; border-radius: 32px; overflow: hidden;
  background: var(--panel-strong); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.08);
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transform: scale(1.03);
  transition: opacity .6s ease, transform .6s ease;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, .88) 0%, rgba(3, 7, 18, .55) 40%, rgba(3, 7, 18, .2) 100%),
              linear-gradient(180deg, rgba(3,7,18,.15), rgba(3,7,18,.65));
}
.hero-copy {
  position: absolute; left: 0; top: 0; height: 100%; width: min(60%, 640px);
  padding: 54px; display: flex; flex-direction: column; justify-content: center; gap: 16px; z-index: 2;
}
.hero-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); color: #dbeafe;
}
.hero-copy h1, .hero-copy h2 {
  margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: 1.03;
}
.hero-copy p { margin: 0; color: rgba(229, 238, 252, 0.88); font-size: 16px; max-width: 46ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta span, .movie-card__tags span, .detail-meta span, .chip {
  padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.10);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.hero-controls {
  position: absolute; left: 28px; right: 28px; bottom: 26px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.hero-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.32); padding: 0;
}
.hero-dots button.is-active { background: #fff; width: 34px; border-radius: 999px; }
.hero-arrow-group { display: flex; gap: 10px; }
.hero-arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.10); color: white;
}
.hero-side {
  display: grid; grid-template-rows: auto 1fr auto; padding: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(6, 10, 20, .96));
}
.side-block + .side-block { margin-top: 16px; }
.side-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.compact-list { display: grid; gap: 12px; }
.compact-card {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center;
  padding: 10px; border-radius: 18px; background: rgba(255,255,255,0.04); border: 1px solid var(--line);
}
.compact-card img { width: 72px; height: 96px; object-fit: cover; border-radius: 14px; }
.compact-card span { font-weight: 700; line-height: 1.35; }
.search-panel {
  margin-top: 14px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.search-panel form { display: flex; gap: 10px; }
.search-panel input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text);
}
.search-panel button {
  padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, #22c55e, #16a34a); color: white; border: 0;
}
.hero-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px;
}
.fact {
  padding: 14px; border-radius: 18px; background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.fact strong { display: block; font-size: 22px; }
.fact span { color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid.cards--small { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
.movie-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 12px 34px rgba(2,6,23,0.22);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.movie-card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,0.35); background: rgba(255,255,255,0.06); }
.movie-card__poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; }
.movie-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.movie-card:hover .movie-card__poster img { transform: scale(1.05); }
.movie-card__year {
  position: absolute; left: 12px; top: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(5,10,20,0.72); color: white; font-size: 12px; border: 1px solid rgba(255,255,255,0.14);
}
.movie-card__body { padding: 14px; }
.movie-card__body h3 { margin: 0 0 6px; font-size: 16px; line-height: 1.35; }
.movie-card__body h3 a:hover { color: #b7d2ff; }
.movie-card__meta, .movie-card__line { margin: 0; color: var(--muted); font-size: 13px; }
.movie-card__line { margin-top: 8px; min-height: 38px; }
.movie-card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.movie-card__tags span { font-size: 12px; padding: 5px 9px; }
.movie-card--small .movie-card__body { padding: 12px; }
.movie-card--small .movie-card__body h3 { font-size: 15px; }

.category-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.category-strip .chip { background: rgba(255,255,255,0.05); }

.panel {
  padding: 20px; border-radius: 28px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.section-inner + .section-inner { margin-top: 16px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--muted); }
.breadcrumb a { color: #dbeafe; }
.detail-layout {
  display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start;
}
.detail-poster {
  border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow); position: sticky; top: 100px;
}
.detail-poster img { aspect-ratio: 2 / 3; object-fit: cover; }
.detail-poster .poster-actions { padding: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-main { display: grid; gap: 18px; }
.detail-title { margin: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1.08; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.detail-text { color: #d8e4fb; }
.player-box { padding: 18px; border-radius: 26px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.player-frame {
  position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid rgba(255,255,255,0.08);
}
.player-frame video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.play-btn {
  position: absolute; inset: 0; margin: auto; width: 92px; height: 92px; z-index: 2;
  background: rgba(255,255,255,0.14); color: white; border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px); display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
.play-btn::before {
  content: ''; width: 0; height: 0; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 6px;
}
.play-btn.is-playing { opacity: 0; pointer-events: none; transform: scale(.95); transition: .2s ease; }
.detail-sections { display: grid; gap: 18px; }
.detail-box {
  padding: 20px; border-radius: 24px; background: rgba(255,255,255,0.04); border: 1px solid var(--line);
}
.detail-box h2 { margin: 0 0 14px; font-size: 22px; }
.detail-box p { margin: 0; color: #dce8fb; }
.related-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.site-footer {
  margin-top: 38px; padding: 32px 0 44px; border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.36);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.footer-logo { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.site-footer h3 { margin: 0 0 10px; }
.site-footer a { display: block; color: #b9c7df; margin: 6px 0; }
.site-footer p { color: var(--muted); margin: 0; }

.search-topbar { display: grid; gap: 14px; }
.search-topbar form { display: flex; gap: 10px; }
.search-topbar input {
  flex: 1; min-width: 0; padding: 15px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--text);
}
.search-topbar button {
  padding: 15px 20px; border-radius: 16px; border: 0;
  background: linear-gradient(135deg, #60a5fa, #22c55e); color: white;
}
.search-stats { color: var(--muted); }

.empty-state {
  padding: 34px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 24px; background: rgba(255,255,255,0.03);
}

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto auto 1fr; }
  .site-search { grid-column: 1 / -1; width: 100%; justify-self: stretch; padding-bottom: 14px; }
  .hero-grid, .detail-layout, .footer-grid { grid-template-columns: 1fr; }
  .hero-carousel { min-height: 560px; }
  .hero-copy { width: 72%; padding: 34px; }
  .detail-poster { position: static; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 20px, 1320px); }
  .nav-toggle { display: inline-block; justify-self: end; }
  .site-nav {
    display: none; grid-column: 1 / -1; flex-wrap: wrap; padding: 10px 0 12px;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .header-inner { grid-template-columns: auto 1fr auto; }
  .brand-text { font-size: 16px; }
  .hero-carousel { min-height: 760px; }
  .hero-copy { width: 100%; padding: 22px; justify-content: flex-end; }
  .hero-grid { gap: 14px; }
  .hero-controls { left: 16px; right: 16px; bottom: 16px; flex-direction: column; align-items: flex-start; }
  .hero-facts { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .search-panel form, .search-topbar form { flex-direction: column; }
  .search-panel button, .search-topbar button { width: 100%; }
}
