:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #60a5fa;
  --cyan: #67e8f9;
  --accent: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.28), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  color: white;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link {
  color: #dbeafe;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  outline: none;
}

.top-search input {
  width: 210px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
}

.top-search button,
.big-search button,
.filter-panel button,
.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.top-search button,
.big-search button,
.primary-btn {
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  min-height: 44px;
  padding: 0 18px;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.34);
  background: rgba(15, 23, 42, 0.44);
}

.top-search button:hover,
.big-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.15) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 22px;
}

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

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-text {
  max-width: 660px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.7;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  background: rgba(30, 58, 138, 0.28);
  font-size: 12px;
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(14px);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dots button {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--cyan);
}

.section-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section-heading h2,
.intro-search h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

.intro-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 32px;
  align-items: center;
}

.intro-search p,
.page-hero p,
.category-overview-card p,
.detail-one-line,
.detail-content p,
.movie-card p,
.ranking-item p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.big-search {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.big-search button {
  min-width: 120px;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.14));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-tile:hover img {
  opacity: 0.66;
  transform: scale(1.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
}

.filter-panel button {
  align-self: end;
  height: 44px;
  padding: 0 18px;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.3);
  background: rgba(30, 41, 59, 0.8);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5), rgba(8, 47, 73, 0.5));
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #082f49;
  background: linear-gradient(135deg, #fde68a, #67e8f9);
  font-weight: 900;
  font-size: 12px;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
}

.movie-card h3,
.ranking-item h3 {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  margin: 8px 0 12px;
  font-size: 13px;
}

.tag-row {
  min-height: 28px;
}

.ranking-block {
  width: min(1280px, calc(100% - 32px));
}

.ranking-list,
.ranking-page-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
}

.ranking-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 15px;
  background: rgba(30, 58, 138, 0.28);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #082f49;
  background: linear-gradient(135deg, #67e8f9, #fde68a);
  font-weight: 950;
}

.ranking-item p {
  margin: 8px 0 0;
  font-size: 14px;
}

.page-main {
  padding-top: 24px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.28), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 58, 138, 0.55));
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 58px;
}

.category-hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  align-items: center;
}

.category-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.75);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfdbfe;
  font-size: 14px;
}

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.34), transparent 30rem),
    rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.detail-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.detail-one-line {
  margin: 20px 0;
  font-size: 19px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-stats span {
  padding: 9px 13px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.64);
}

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

.player-section h2 {
  margin-bottom: 18px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: black;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  color: white;
  border: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  color: #082f49;
  background: linear-gradient(135deg, #67e8f9, #dbeafe);
  font-size: 28px;
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.32);
}

.narrow-section {
  width: min(980px, calc(100% - 32px));
}

.detail-content {
  padding-top: 44px;
}

.detail-content h2 {
  margin-top: 28px;
  font-size: clamp(24px, 3vw, 34px);
}

.detail-content p {
  font-size: 17px;
}

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

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 950;
  color: var(--cyan);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: var(--cyan);
}

.copyright {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: #64748b;
  font-size: 14px;
}

@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) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-menu {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-left: 0;
    padding: 12px 0;
  }

  .site-menu.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.58);
  }

  .top-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 90px;
  }

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

  .intro-search,
  .category-hero,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .ranking-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand {
    font-size: 20px;
  }

  .hero {
    height: auto;
    min-height: 600px;
  }

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

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

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

  .hero-nav {
    display: none;
  }

  .section-shell {
    padding: 42px 0;
  }

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

  .big-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .big-search input,
  .big-search button {
    min-height: 48px;
    width: 100%;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding: 18px;
  }

  .small-hero {
    padding: 34px 22px;
  }
}
