:root {
  --bg: #07111f;
  --bg-soft: #0f1b2d;
  --bg-card: #111f34;
  --bg-card-strong: #17263d;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --danger: #ef4444;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.17), transparent 36rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner,
.sub-nav-inner,
.footer-inner,
.content-section,
.quick-search-section,
.page-hero,
.breadcrumb,
.detail-hero,
.player-section,
.detail-content,
.category-preview {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.logo-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

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

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

.nav-link {
  padding: 10px 14px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active,
.sub-nav-link:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.15);
}

.nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input {
  width: 220px;
  padding: 8px 10px;
}

.header-search button,
.mobile-search button,
.large-search button {
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.header-search button {
  padding: 8px 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.sub-nav {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.sub-nav-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
}

.sub-nav-link {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 14px;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.96);
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
}

.mobile-search input {
  padding: 9px 10px;
}

.mobile-search button {
  padding: 9px 14px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98) 0%, rgba(7, 17, 31, 0.72) 42%, rgba(7, 17, 31, 0.24) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - var(--max)) / 2));
  padding-top: 112px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 850px;
  font-size: clamp(38px, 6vw, 74px);
}

.hero-movie-title {
  margin-top: 20px !important;
  font-size: clamp(30px, 4vw, 52px);
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.11);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.btn.text {
  color: #fed7aa;
}

.hero-panel {
  position: absolute;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 40px;
  z-index: 5;
  width: min(430px, calc(100% - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel > p {
  margin: 0 0 10px;
  color: #cbd5e1;
  font-weight: 900;
}

.hero-dot {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.hero-dot.active,
.hero-dot:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #fff;
}

.hero-dot img {
  width: 68px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.12);
}

.hero-dot span {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick-search-section,
.content-section,
.category-preview,
.page-hero,
.detail-content,
.player-section {
  margin-top: 48px;
}

.quick-search-section {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading.centered {
  display: block;
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p,
.category-intro {
  color: var(--muted);
}

.section-heading a {
  flex: 0 0 auto;
  color: #fed7aa;
  font-weight: 900;
}

.large-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
}

.large-search input {
  min-height: 50px;
  padding: 0 16px;
  font-size: 16px;
}

.large-search button {
  padding: 0 24px;
}

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

.category-tile {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(30, 41, 59, 0.88);
}

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

.category-covers img {
  width: 100%;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.12);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dark-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.38);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(23, 38, 61, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
}

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

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

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fed7aa;
}

.movie-card p {
  min-height: 66px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 12px;
}

.compact .movie-card-body {
  padding: 12px;
}

.compact p {
  min-height: 44px;
}

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

.page-hero {
  padding: 62px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(36px, 6vw, 68px);
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 12px;
  width: min(var(--max), calc(100% - 32px));
  margin: 34px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.48);
}

.filter-bar select option {
  color: #111827;
}

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

.breadcrumb a {
  color: #fed7aa;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(250px, 360px) 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster-wrap {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  max-width: 860px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-meta-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.36);
}

.player-section {
  border-radius: 30px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.28));
  cursor: pointer;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
  font-size: 34px;
  text-indent: 5px;
}

.player-cover span:last-child {
  font-size: 20px;
  font-weight: 900;
}

.player-section.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-content {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.66);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 17px;
}

.related-section {
  margin-bottom: 60px;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
  font-size: 18px;
}

.footer-inner p {
  max-width: 620px;
  margin: 8px 0 0;
}

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

.footer-links a {
  color: #fed7aa;
  font-weight: 800;
}

.hidden-card {
  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));
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 92px;
  }

  .hero-panel {
    left: 16px;
    right: 16px;
    bottom: 22px;
    width: auto;
  }

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

  .detail-poster-wrap {
    max-width: 360px;
  }

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

@media (max-width: 680px) {
  .header-inner,
  .sub-nav-inner,
  .footer-inner,
  .content-section,
  .quick-search-section,
  .page-hero,
  .breadcrumb,
  .detail-hero,
  .player-section,
  .detail-content,
  .category-preview {
    width: min(100% - 24px, var(--max));
  }

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

  .hero-slider {
    min-height: 760px;
  }

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

  .hero-movie-title {
    font-size: 30px;
  }

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

  .hero-panel {
    padding: 12px;
  }

  .hero-dot {
    grid-template-columns: 56px 1fr;
  }

  .hero-dot img {
    width: 56px;
    height: 40px;
  }

  .quick-search-section,
  .page-hero,
  .detail-hero,
  .detail-content,
  .dark-panel {
    padding: 22px;
  }

  .large-search {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .movie-grid,
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-card p {
    min-height: 56px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .play-symbol {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .category-grid,
  .movie-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
