:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --strong: #f8fafc;
  --accent: #f59e0b;
  --accent-two: #f97316;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.34);
}

.logo-text {
  font-size: 20px;
  color: var(--strong);
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--strong);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid var(--border);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

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

.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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-label span,
.eyebrow {
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 800px;
  color: var(--strong);
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: #cbd5e1;
}

.hero-meta span {
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
}

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

.primary-button,
.ghost-button,
.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-bar button {
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
  border: 0;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.ghost-button {
  color: var(--strong);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--border);
}

.primary-button:hover,
.ghost-button:hover,
.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(245, 158, 11, 0.28);
}

.small-button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  color: var(--strong);
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search {
  position: relative;
  z-index: 2;
  margin-top: -30px;
}

.quick-search-inner,
.filter-panel,
.search-page-box {
  padding: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-bar input,
.filter-panel input,
.filter-panel select,
.search-page-box input {
  width: 100%;
  min-height: 46px;
  color: var(--strong);
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
}

.search-bar input,
.filter-panel input,
.search-page-box input {
  padding: 0 16px;
}

.filter-panel select {
  padding: 0 12px;
}

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

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quick-links a {
  padding: 10px 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.quick-links a:hover {
  color: #0f172a;
  background: var(--accent);
}

.content-stack {
  display: grid;
  gap: 72px;
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
  border-radius: 14px;
}

.section-heading h2,
.page-hero h1,
.watch-title-block h1,
.text-card h2,
.tag-section h2,
.info-card h2 {
  margin: 0;
  color: var(--strong);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-heading p,
.page-hero p,
.category-panel p,
.category-card-copy p,
.watch-title-block p,
.text-card p,
.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.six-cols {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.offset-grid {
  margin-top: 18px;
}

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  color: var(--text);
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  color: #0f172a;
  background: rgba(245, 158, 11, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--strong);
  font-size: 16px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc,
.compact-card small,
.rank-info small,
.ranking-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.large .card-body strong {
  font-size: 20px;
}

.movie-card.horizontal {
  grid-template-columns: 98px minmax(0, 1fr);
}

.movie-card.horizontal .poster-wrap {
  aspect-ratio: 2 / 3;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

.category-overview-grid {
  grid-template-columns: 1fr;
}

.category-panel,
.category-card-full,
.info-card,
.text-card,
.tag-section,
.related-section {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.category-panel,
.category-card-full {
  padding: 22px;
}

.category-panel-head,
.category-card-full {
  display: grid;
  gap: 22px;
}

.category-panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 18px;
}

.category-panel h3,
.category-card-copy h2 {
  margin: 0;
  color: var(--strong);
}

.category-panel-head a {
  padding: 8px 12px;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.compact-card img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card strong,
.rank-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--strong);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-ranking {
  padding: 26px;
  background: rgba(15, 23, 42, 0.36);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.rank-number {
  color: var(--accent);
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.page-main {
  min-height: calc(100vh - 260px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
  border-bottom: 1px solid var(--border);
}

.slim-hero {
  padding: 72px 0 56px;
}

.page-hero h1 {
  max-width: 900px;
  margin-top: 18px;
  font-size: clamp(34px, 6vw, 60px);
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(140px, 180px));
  gap: 12px;
}

.category-card-full {
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
}

.ranking-stack {
  display: grid;
  gap: 18px;
  padding: 56px 0;
}

.ranking-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ranking-poster {
  position: relative;
}

.ranking-poster img {
  width: 116px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-poster span {
  position: absolute;
  left: -8px;
  top: -8px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #0f172a;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 900;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  color: var(--strong);
}

.ranking-copy p {
  margin: 12px 0;
  color: #cbd5e1;
}

.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-page-box input {
  font-size: 18px;
}

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

.detail-main {
  padding: 44px 0 72px;
}

.detail-wrap {
  display: grid;
  gap: 34px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.watch-title-block {
  margin-bottom: 22px;
}

.watch-title-block h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5vw, 54px);
}

.detail-meta {
  margin-top: 20px;
  margin-bottom: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background: #000;
  border: 0;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.play-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.08));
}

.play-layer.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 6px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent), var(--accent-two));
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 20px 70px rgba(245, 158, 11, 0.42);
}

.watch-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.info-card,
.text-card,
.tag-section,
.related-section {
  padding: 22px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

.info-card dt {
  color: var(--muted);
}

.info-card dd {
  margin: 0;
  color: var(--strong);
}

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

.text-card p {
  color: #cbd5e1;
  white-space: pre-line;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-list span {
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
}

.footer-inner strong {
  color: var(--strong);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
}

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

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

@media (max-width: 1100px) {
  .six-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .four-cols,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .watch-side {
    position: static;
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 600px;
  }

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

  .hero-arrow {
    display: none;
  }

  .quick-search-inner,
  .filter-panel,
  .category-card-full,
  .watch-side,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-search-inner,
  .footer-inner {
    display: grid;
  }

  .quick-links {
    justify-content: flex-start;
  }

  .six-cols,
  .four-cols,
  .horizontal-grid,
  .category-grid,
  .rank-list,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .ranking-poster img {
    width: 92px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .search-bar,
  .six-cols,
  .four-cols,
  .horizontal-grid,
  .category-grid,
  .compact-grid,
  .rank-list,
  .search-results {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .content-stack {
    gap: 52px;
    padding: 52px 0;
  }

  .ranking-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .ranking-poster img {
    width: 82px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
