:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.68);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #a855f7;
  --pink: #ec4899;
  --yellow: #facc15;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30vw),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 34vw),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #000000 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: white;
  white-space: nowrap;
}

.site-logo {
  font-size: 22px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--violet));
  color: white;
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.26);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.nav-link,
.mobile-nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 9px 12px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: white;
  background: rgba(34, 211, 238, 0.14);
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 4px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 8px 10px 8px 14px;
}

.header-search input::placeholder,
.search-box-row input::placeholder {
  color: #64748b;
}

.header-search button,
.search-box-row button {
  border: 0;
  color: white;
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  cursor: pointer;
}

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

.menu-toggle span {
  display: block;
  height: 2px;
  background: white;
  border-radius: 999px;
  margin: 5px 0;
}

.mobile-menu {
  display: none;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-nav-link {
  padding: 12px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero-slides {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 52px;
  padding: 118px max(24px, calc((100vw - 1480px) / 2 + 24px)) 96px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.012);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.18);
  transform: scale(1.1);
  opacity: 0.52;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.78));
}

.hero-backdrop {
  position: absolute;
  right: 7vw;
  top: 110px;
  width: min(50vw, 820px);
  height: min(50vh, 460px);
  z-index: -1;
  border-radius: 42px;
  overflow: hidden;
  opacity: 0.35;
  box-shadow: var(--shadow);
}

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

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0;
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(17px, 1.6vw, 22px);
}

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

.hero-tags {
  margin: 26px 0;
}

.hero-tags span,
.detail-tags span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.26);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(34vw, 360px);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.player-cover img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span,
.poster-play {
  position: absolute;
  inset: auto 20px 20px auto;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.36);
}

.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(1480px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 4;
}

.hero-dots,
.hero-quick-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 56px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-quick-links a {
  color: var(--muted-strong);
  font-weight: 750;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--line);
}

.home-search-wrap {
  width: min(1480px, calc(100% - 32px));
  margin: 32px auto 0;
}

.content-section,
.detail-main-grid,
.player-section {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

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

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

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.74);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.54);
}

.category-glow {
  position: absolute;
  right: -36px;
  top: -36px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.24);
  filter: blur(8px);
}

.category-tile strong {
  position: relative;
  font-size: 22px;
  color: white;
  margin-bottom: 8px;
}

.category-tile em {
  position: relative;
  color: var(--muted-strong);
  font-style: normal;
  font-size: 14px;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.56);
  background: rgba(15, 23, 42, 0.86);
}

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

.poster-link img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.score-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: var(--yellow);
  box-shadow: 0 10px 26px rgba(250, 204, 21, 0.28);
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
  opacity: 0.82;
}

.poster-play {
  width: 42px;
  height: 42px;
  right: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-content {
  padding: 15px;
}

.card-content h2,
.rank-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.card-content h2 a:hover,
.rank-info h2 a:hover {
  color: var(--cyan);
}

.card-content p,
.rank-info p,
.footer-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card .card-content p {
  display: none;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.52);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #2563eb, #a855f7);
}

.rank-thumb {
  width: 86px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-info {
  min-width: 0;
}

.rank-info p {
  -webkit-line-clamp: 1;
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  margin-bottom: 26px;
}

.search-box-row {
  display: flex;
  gap: 12px;
}

.search-box-row input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  color: white;
  background: rgba(2, 6, 23, 0.78);
  padding: 0 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.filter-row select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: #0f172a;
  padding: 0 16px;
  outline: 0;
}

.empty-state {
  display: none;
  color: var(--muted-strong);
  padding: 18px 0 0;
  margin: 0;
}

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

.page-hero {
  width: min(1480px, calc(100% - 32px));
  margin: 34px auto 0;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(36px, 6vw, 76px);
  background:
    radial-gradient(circle at 15% 15%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 16px;
  max-width: 900px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.category-preview-list {
  display: grid;
  gap: 30px;
}

.category-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: rgba(15, 23, 42, 0.52);
}

.category-preview h2 {
  margin: 0 0 18px;
}

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

.detail-hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  display: flex;
  align-items: end;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.7) 52%, rgba(2, 6, 23, 0.96)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 62%, rgba(2, 6, 23, 0.86) 100%);
}

.detail-layout {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  padding: 112px 0 70px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-copy {
  max-width: 920px;
}

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

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 5vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.detail-tags {
  margin-bottom: 26px;
}

.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.detail-article,
.detail-meta-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.detail-article {
  padding: clamp(24px, 3vw, 38px);
}

.detail-article h2,
.detail-meta-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.9;
  text-align: justify;
  margin: 0 0 28px;
}

.detail-article p:last-child {
  margin-bottom: 0;
}

.detail-meta-card {
  padding: 26px;
  align-self: start;
  position: sticky;
  top: 100px;
}

.detail-meta-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.detail-meta-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.detail-meta-card strong {
  color: var(--muted);
}

.detail-meta-card span,
.detail-meta-card a {
  color: white;
  font-weight: 750;
  text-align: right;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 32px;
  aspect-ratio: 16 / 9;
  background: black;
  box-shadow: var(--shadow);
}

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

.player-video {
  z-index: 1;
  background: black;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: black;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(0, 0, 0, 0.72));
}

.movie-player.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 96px;
  height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 24px 64px rgba(6, 182, 212, 0.36);
  font-size: 34px;
}

.play-button span {
  transform: translateX(3px);
}

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

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

.footer-logo {
  font-size: 20px;
  margin-bottom: 14px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: #64748b;
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: 760px;
    padding-top: 98px;
  }

  .hero-poster {
    display: none;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .detail-layout,
  .detail-main-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .detail-meta-card {
    position: static;
  }

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

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 22px, 1480px);
    min-height: 68px;
    gap: 12px;
  }

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

  .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .mobile-menu.is-open {
    grid-template-columns: 1fr;
  }

  .hero-carousel,
  .hero-slides {
    min-height: 680px;
  }

  .hero-slide {
    min-height: 680px;
    gap: 20px;
    padding: 96px 16px 100px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-quick-links {
    flex-wrap: wrap;
  }

  .content-section,
  .detail-main-grid,
  .player-section,
  .page-hero {
    width: min(100% - 24px, 1480px);
  }

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

  .movie-grid,
  .large-grid,
  .related-grid,
  .category-grid,
  .wide-category-grid,
  .preview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-tile {
    min-height: 138px;
    padding: 18px;
  }

  .card-content {
    padding: 12px;
  }

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

  .rank-item {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .rank-thumb {
    width: 72px;
  }

  .search-box-row {
    flex-direction: column;
  }

  .filter-row select {
    width: 100%;
  }

  .page-hero {
    border-radius: 24px;
    padding: 28px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-layout {
    width: min(100% - 24px, 1480px);
    padding: 92px 0 44px;
    gap: 24px;
  }

  .detail-copy h1 {
    font-size: 38px;
  }

  .detail-article,
  .detail-meta-card {
    border-radius: 22px;
    padding: 22px;
  }

  .movie-player {
    border-radius: 22px;
  }

  .play-button {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .large-grid,
  .related-grid,
  .category-grid,
  .wide-category-grid,
  .preview-cards {
    grid-template-columns: 1fr;
  }
}
