:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, var(--bg) 32%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.site-nav {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: white;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
  color: #d1d5db;
  font-weight: 650;
}

.nav-links a,
.mobile-menu a,
.footer-links a,
.text-link,
.mini-link-list a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover,
.text-link:hover,
.mini-link-list a:hover {
  color: var(--accent);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 22px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-menu.is-open {
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: 38px;
  padding: 86px max(22px, calc((100vw - 1280px) / 2 + 22px)) 96px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-bg {
  position: absolute;
  inset: -18px;
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  object-fit: cover;
  filter: brightness(0.42) blur(2px);
  transform: scale(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62) 48%, rgba(2, 6, 23, 0.55)),
    linear-gradient(0deg, #0f172a 0%, transparent 30%, transparent 70%, rgba(2, 6, 23, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.watch-info h1 {
  margin: 0;
  color: white;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-summary {
  max-width: 720px;
  margin: 26px 0 0;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.7;
}

.hero-tags,
.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.26);
}

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

.ghost-button {
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.54);
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.ghost-button:hover {
  border-color: rgba(245, 158, 11, 0.48);
  color: #fef3c7;
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.search-section,
.watch-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px;
}

.search-section {
  padding-top: 56px;
  padding-bottom: 28px;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading h2,
.footer-links h2,
.side-panel h2,
.detail-copy h2,
.category-card-large h2 {
  margin: 0 0 8px;
  color: white;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-heading p,
.category-card-large p,
.page-hero p,
.footer-about p,
.detail-copy p,
.side-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.compact-heading {
  margin-bottom: 22px;
}

.compact-heading h2 {
  font-size: clamp(24px, 2.5vw, 34px);
}

.search-box {
  position: relative;
  max-width: 760px;
}

.site-search {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  padding: 0 22px;
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.22);
}

.site-search:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-button {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  color: #cbd5e1;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: white;
  background: rgba(245, 158, 11, 0.92);
  border-color: rgba(245, 158, 11, 0.92);
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.card-link:hover {
  transform: translateY(-7px) scale(1.015);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.45);
}

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

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

.card-link:hover .poster-wrap img {
  transform: scale(1.08);
  filter: brightness(0.86);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.95);
}

.year-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.75);
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.95);
  color: white;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.3);
}

.card-link:hover .hover-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 18px;
  line-height: 1.3;
  min-height: 46px;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--accent);
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.category-overview {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.category-tile,
.category-card-large,
.ranking-box,
.side-panel,
.detail-copy article {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.66);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.18);
}

.category-tile {
  display: block;
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
}

.tile-posters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.tile-posters img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
}

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

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.ranking-box,
.side-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.36);
}

.rank-row img {
  width: 54px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row strong {
  color: white;
  line-height: 1.35;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.45;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 800;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 86px 22px 40px;
  text-align: center;
}

.slim-hero {
  padding-top: 92px;
  padding-bottom: 34px;
}

.category-hero {
  padding-bottom: 24px;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  max-width: 820px;
  margin: 20px auto 0;
  font-size: 18px;
}

.centered-actions {
  justify-content: center;
}

.category-list-large {
  display: grid;
  gap: 24px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 26px;
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-cover-set img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.mini-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mini-link-list a {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.watch-page {
  padding-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

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

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

.player-panel {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
}

.player-shell video,
.watch-cover,
.watch-cover img,
.watch-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  object-fit: contain;
  background: #020617;
}

.watch-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  color: white;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.watch-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.watch-cover img {
  object-fit: cover;
  filter: brightness(0.52);
}

.watch-cover-shade {
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.24), transparent 19rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 70%);
}

.watch-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 24px 52px rgba(245, 158, 11, 0.32);
  font-size: 34px;
}

.watch-info {
  padding: 28px;
}

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

.detail-tags {
  margin-top: 18px;
}

.lead-text {
  margin: 22px 0 0;
  color: #d1d5db;
  line-height: 1.85;
  font-size: 17px;
}

.detail-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding-left: 0;
  padding-right: 0;
}

.detail-copy article {
  padding: 30px;
}

.detail-copy p {
  margin-bottom: 24px;
  color: #d1d5db;
  font-size: 17px;
}

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

.detail-nav-links a {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-weight: 700;
}

.detail-nav-links a:hover {
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.34);
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.92);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 46px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 18px;
  color: var(--muted-strong);
}

.footer-links h2 {
  font-size: 22px;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 28px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 16px;
    font-size: 14px;
  }

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

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

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

  .ranking-box,
  .side-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 74vh;
    padding: 86px 22px 90px;
  }

  .hero-poster {
    display: none;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: clamp(38px, 13vw, 62px);
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .full-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-nav {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .hero-carousel {
    min-height: 78vh;
  }

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

  .hero-actions,
  .detail-nav-links {
    grid-template-columns: 1fr;
    display: grid;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .content-section,
  .search-section,
  .watch-page,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
    min-height: 42px;
  }

  .watch-info,
  .detail-copy article,
  .side-panel {
    padding: 20px;
  }

  .watch-play-icon {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
