:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --line-blue: rgba(59, 130, 246, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --cyan: #22d3ee;
  --yellow: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #07111f 46%, #020617 100%);
  color: var(--text);
  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;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.88));
  border-bottom: 1px solid var(--line-blue);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1240px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.38);
}

.brand-text {
  font-size: 1.2rem;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-links > a,
.nav-dropdown > button,
.nav-dropdown-menu a {
  border-radius: 999px;
  padding: 10px 15px;
  color: var(--muted-strong);
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-links > a:hover,
.site-links > a.is-active,
.nav-dropdown:hover > button,
.nav-dropdown-menu a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.16);
  border-color: var(--line-blue);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 188px;
  padding: 10px;
  border: 1px solid var(--line-blue);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  border-radius: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-blue);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 4px;
}

main {
  padding-top: 74px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 38%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 30px;
}

.hero-content h1 {
  max-width: 820px;
  margin: 20px 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 18px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.24rem);
}

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

.hero-labels span,
.hero-tags span,
.tag-row span,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-blue);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.17);
  color: #dbeafe;
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-labels span:first-child,
.section-kicker {
  border-color: rgba(34, 211, 238, 0.36);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.82));
  color: #ffffff;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.36);
}

.btn-soft {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.17);
  border-color: var(--line-blue);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 48px;
  z-index: 5;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel span {
  display: block;
  color: var(--blue-light);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-panel strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hero-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--line-blue);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  padding: 12px 16px;
}

.hero-search input::placeholder,
.filter-controls input::placeholder {
  color: #64748b;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  padding: 0 20px;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  right: max(16px, calc((100% - 1240px) / 2));
  bottom: 142px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 46px;
  background: #60a5fa;
}

.hero-glow {
  position: absolute;
  z-index: 1;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.42;
}

.hero-glow-one {
  top: 22%;
  right: 10%;
  background: #2563eb;
}

.hero-glow-two {
  bottom: 10%;
  left: 22%;
  background: #0891b2;
}

.quick-channel,
.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-channel {
  padding: 28px 0 0;
}

.quick-channel-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.55);
}

.quick-channel strong {
  margin-right: 4px;
}

.quick-channel a {
  border-radius: 999px;
  padding: 8px 13px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
}

.content-section {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  line-height: 1.08;
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.28);
}

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

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

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

.category-card span {
  display: block;
  margin-top: 92px;
  font-size: 1.28rem;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.38;
}

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

.rank-layout {
  grid-template-columns: 340px minmax(0, 1fr);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-copy span {
  color: var(--blue-light);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-copy strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 12px;
}

.filter-controls label span {
  display: block;
  margin: 0 0 6px 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.filter-controls select option {
  background: #0f172a;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.card-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
}

.card-play {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 0.84rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.95);
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--blue-light);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-body h3 {
  min-height: 3.1em;
  margin: 8px 0 8px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--blue-light);
}

.card-body p {
  display: -webkit-box;
  min-height: 4.5em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.75rem;
  color: #bfdbfe;
  background: rgba(30, 41, 59, 0.72);
}

.rank-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.8));
  box-shadow: var(--shadow);
}

.sticky-rank {
  position: sticky;
  top: 96px;
}

.rank-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.rank-title span {
  display: block;
  color: var(--blue-light);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rank-title h2 {
  margin: 0;
  font-size: 1.8rem;
}

.rank-title a {
  color: var(--blue-light);
  font-weight: 800;
}

.rank-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel li + li {
  margin-top: 10px;
}

.rank-panel li a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.45);
}

.rank-panel li a:hover {
  border-color: var(--line-blue);
  background: rgba(37, 99, 235, 0.18);
}

.rank-panel li span {
  grid-row: span 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
  font-weight: 900;
}

.rank-panel li strong,
.rank-panel li em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-panel li em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.page-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.28), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.88));
}

.page-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero span {
  color: var(--blue-light);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  max-width: 820px;
  margin: 10px 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.compact-hero {
  min-height: 300px;
}

.detail-hero {
  padding: 38px 0 54px;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.24;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.2));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--muted);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.detail-main h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 1.12rem;
}

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

.detail-info div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-info span,
.detail-info strong {
  display: block;
}

.detail-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-info strong {
  margin-top: 4px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.player-card,
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-heading {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.player-heading span {
  color: var(--blue-light);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-heading h2 {
  margin: 4px 0 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.76));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.44);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #ffffff;
}

.play-mask strong {
  font-size: 1.12rem;
}

.article-card {
  padding: 24px;
}

.article-card h2 {
  margin: 0 0 12px;
}

.article-card h2 + p {
  margin-top: 0;
}

.article-card p {
  color: var(--muted-strong);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  padding: 38px 0;
}

.footer-brand {
  font-size: 1.25rem;
}

.site-footer p {
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: #ffffff;
  border-color: var(--line-blue);
  background: rgba(37, 99, 235, 0.16);
}

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

@media (max-width: 1160px) {
  .category-grid,
  .library-grid,
  .ranking-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .two-column,
  .rank-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .sticky-rank {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-nav {
    height: 66px;
  }

  main {
    padding-top: 66px;
  }

  .nav-toggle {
    display: block;
  }

  .site-links {
    position: absolute;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line-blue);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
  }

  .hero {
    min-height: 760px;
  }

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

  .hero-panel {
    grid-template-columns: 1fr;
    bottom: 30px;
  }

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

  .hero-search button {
    min-height: 44px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 178px;
  }

  .filter-panel,
  .filter-controls,
  .footer-inner,
  .detail-grid,
  .detail-info {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 560px) {
  .site-nav,
  .quick-channel,
  .content-section,
  .page-hero > div,
  .detail-wrap,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-content {
    width: calc(100% - 24px);
  }

  .hero-content h1 {
    font-size: clamp(2.3rem, 15vw, 4.2rem);
  }

  .hero-panel {
    width: calc(100% - 24px);
  }

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

  .card-poster {
    aspect-ratio: 16 / 10;
  }

  .card-body h3 {
    min-height: auto;
  }

  .card-body p {
    min-height: auto;
  }

  .content-section {
    padding: 40px 0;
  }
}
