:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-900: #1e3a8a;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --dark: #020617;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #eef6ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
}

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

.nav-link,
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  color: #334155;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-dropdown:hover > a,
.nav-link.is-active,
.nav-dropdown > a.is-active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.header-search input {
  width: 230px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.header-search button,
.search-panel button {
  height: 42px;
  border: 0;
  padding: 0 18px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary-600);
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  color: #ffffff;
  background: #020617;
}

.hero-slider {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  padding: 84px max(32px, calc((100vw - 1280px) / 2)) 96px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: blur(6px);
  opacity: 0.56;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 35%, rgba(59, 130, 246, 0.3), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.42) 100%);
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 20px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

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

.primary-button {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: var(--primary-700);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
  display: block;
  overflow: hidden;
  width: 340px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 9px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.92);
  font-weight: 800;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 8;
  width: min(1280px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 22px;
  transform: translateX(-50%);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: #ffffff;
}

.hero-thumbs {
  display: flex;
  gap: 12px;
  margin-left: auto;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hero-thumb {
  width: 154px;
  min-width: 154px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0.7;
}

.hero-thumb.is-active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.58);
}

.hero-thumb img {
  width: 46px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section,
.search-panel,
.page-hero,
.detail-hero,
.breadcrumb,
.player-section {
  margin-top: 40px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-heading h2,
.story-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-panel h2 {
  font-size: 30px;
}

.search-panel p,
.section-heading span,
.page-hero p {
  color: var(--text-muted);
  line-height: 1.7;
}

.search-panel form {
  display: flex;
  gap: 10px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  padding: 0 16px;
  outline: none;
}

.search-panel button {
  height: 52px;
  border-radius: 15px;
}

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

.section-heading h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading span {
  display: block;
  margin-top: 9px;
  max-width: 780px;
}

.section-more {
  min-height: 42px;
  color: #ffffff;
  background: var(--primary-600);
  white-space: nowrap;
}

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

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

.compact-grid,
.search-grid,
.ranking-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.15);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #dbeafe;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-chip {
  left: 12px;
  bottom: 12px;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(37, 99, 235, 0.95);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 34px;
  padding: 0 9px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.card-content {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: #94a3b8;
}

.card-content h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-content h3 a:hover {
  color: var(--primary-700);
}

.card-content p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 64px;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

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

.category-tile {
  display: block;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tile-images,
.mini-posters {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.tile-images img,
.mini-posters img {
  width: 56px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.category-tile strong {
  display: block;
  font-size: 20px;
}

.category-tile span {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.ranking-box {
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.compact-heading h2 {
  font-size: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-50);
  transform: translateX(3px);
}

.rank-item strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary-600);
}

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

.rank-item b,
.rank-item em {
  display: block;
}

.rank-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 540px);
  gap: 28px;
  align-items: center;
  padding: 42px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 20%, rgba(96, 165, 250, 0.45), transparent 34%),
    linear-gradient(135deg, #020617, #1e3a8a 48%, #2563eb);
  box-shadow: var(--shadow);
}

.compact-page-hero {
  display: block;
  min-height: 260px;
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(38px, 5vw, 64px);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.filter-panel input,
.filter-panel select {
  min-width: 0;
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  padding: 0 13px;
  outline: none;
  background: #ffffff;
}

.rank-filter {
  grid-template-columns: 1fr 180px;
  margin-bottom: 22px;
  border-color: var(--line);
  background: #ffffff;
}

.search-filter {
  grid-template-columns: 1fr 150px 150px 150px;
}

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

.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border-radius: 28px;
  color: #ffffff;
  background-image: var(--category-cover);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-cover-link,
.category-card-shade {
  position: absolute;
  inset: 0;
}

.category-cover-link {
  z-index: 1;
}

.category-card-shade {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.88));
}

.category-card-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 28px;
}

.category-card-body > span {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 800;
}

.category-card-body h2 {
  margin: 14px 0 10px;
  font-size: 34px;
}

.category-card-body p {
  color: #dbeafe;
  line-height: 1.7;
}

.small-button {
  min-height: 42px;
  padding: 0 18px;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 38px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 90% 20%, rgba(37, 99, 235, 0.34), transparent 36%),
    linear-gradient(135deg, #020617, #0f172a 62%, #1e3a8a);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 68px);
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
}

.lead-text {
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 28px;
}

.player-section {
  padding: 26px;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  color: #ffffff;
}

.player-heading h2 {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 38px);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.45);
  font-size: 30px;
  line-height: 1;
}

.player-overlay strong {
  font-size: 20px;
}

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

.story-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.story-card h2 {
  font-size: 28px;
}

.story-card p {
  color: #334155;
  line-height: 1.9;
}

.prev-next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prev-next a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
}

.prev-next a:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px dashed #bfdbfe;
  border-radius: 18px;
  text-align: center;
  color: var(--text-muted);
  background: #eff6ff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 56px;
  padding: 36px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 520px;
  margin: 8px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}

.footer-inner nav a {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
  .header-search input {
    width: 180px;
  }

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-box {
    position: static;
  }
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding: 54px 20px 150px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    justify-self: center;
    transform: none;
  }

  .hero-bottom {
    display: block;
  }

  .hero-dots {
    margin-bottom: 12px;
  }

  .search-panel,
  .page-hero,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 24px;
  }

  .detail-poster {
    max-width: 260px;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  main,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .brand-text em {
    display: none;
  }

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

  .hero p,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

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

  .card-content {
    padding: 12px;
  }

  .card-content h3 {
    font-size: 16px;
  }

  .card-content p {
    font-size: 13px;
    min-height: 58px;
  }

  .search-panel,
  .page-hero,
  .player-section,
  .story-card {
    padding: 20px;
    border-radius: 20px;
  }

  .search-panel form,
  .prev-next,
  .footer-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .search-panel form {
    display: grid;
  }

  .hero-arrow {
    display: none;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .search-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }
}
