:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --line: #e5e7eb;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #16a34a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

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

.container,
.page-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
  font-size: 15px;
}

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

.desktop-nav a {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--blue);
}

.header-search,
.mobile-search,
.search-page-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input {
  width: 230px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, 88vw);
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-panel a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  color: var(--text-main);
}

.search-panel a:hover {
  background: #f3f4f6;
}

.search-thumb {
  width: 48px;
  height: 62px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #dbeafe;
}

.search-panel strong,
.search-panel span {
  display: block;
}

.search-panel strong {
  font-size: 14px;
}

.search-panel span {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #374151;
  font-weight: 700;
}

.home-shell {
  padding-top: 28px;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 610px);
  min-height: 440px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.64) 48%, rgba(15, 23, 42, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 78%);
  padding: 72px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
  font-weight: 800;
  font-size: 13px;
}

.hero-kicker {
  background: rgba(255, 255, 255, 0.18);
  color: #dbeafe;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 640px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.movie-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

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

.primary-action,
.secondary-action,
.movie-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-action {
  padding: 14px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.secondary-action {
  padding: 14px 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.primary-action:hover,
.secondary-action:hover,
.movie-link:hover {
  transform: translateY(-2px);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  font-size: 36px;
  transform: translateY(-50%);
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.38);
}

.hero-nav.prev {
  left: 18px;
}

.hero-nav.next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.content-section,
.category-showcase {
  margin-top: 64px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.section-heading p {
  margin-top: 8px;
  color: var(--text-muted);
}

.section-more {
  color: var(--blue);
  white-space: nowrap;
}

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background-color: #dbeafe;
  background-size: cover;
  background-position: center;
}

.cover-chip,
.cover-year {
  position: absolute;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.cover-chip {
  left: 10px;
  top: 10px;
  background: rgba(37, 99, 235, 0.9);
}

.cover-year {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.72);
}

.movie-body {
  padding: 16px;
}

.movie-card h3 {
  margin-top: 10px;
  color: var(--text-main);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

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

.movie-card p {
  min-height: 48px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.movie-link {
  margin-top: 14px;
  padding: 9px 13px;
  color: #ffffff;
  background: var(--blue);
  font-size: 14px;
}

.movie-card.compact .movie-body {
  padding: 13px;
}

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

.movie-card.compact p {
  min-height: 42px;
  font-size: 13px;
}

.category-showcase {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

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

.category-row a,
.category-card {
  display: block;
  padding: 22px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-row a:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.14);
}

.category-row strong,
.category-card strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
}

.category-row span,
.category-card span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 34px;
}

.split-section h3 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 900;
}

.page-shell,
.detail-shell {
  padding-top: 34px;
}

.page-hero {
  padding: 54px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 48%, #ecfeff 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.page-hero h1 {
  margin-top: 16px;
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 740px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar button {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-weight: 800;
}

.filter-bar button.is-active,
.filter-bar button:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: #ffffff;
  background: var(--blue);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #374151;
  text-align: center;
  font-weight: 800;
}

.pagination a:hover,
.pagination a.is-current {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.pagination span {
  opacity: 0.45;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 66px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-2px);
}

.rank-num {
  color: var(--blue);
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.rank-cover {
  width: 66px;
  height: 88px;
  border-radius: 14px;
  background-color: #dbeafe;
  background-size: cover;
  background-position: center;
}

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

.rank-main strong {
  color: var(--text-main);
  font-size: 18px;
  font-weight: 900;
}

.rank-main em {
  margin-top: 5px;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.6;
}

.rank-meta {
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 850;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.42), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 30px;
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.4);
}

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

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

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  color: #ffffff;
  text-align: center;
}

.detail-article,
.info-card {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h1 {
  margin-top: 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.detail-article .lead {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-article h2,
.info-card h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
}

.info-card h2 {
  margin-top: 0;
}

.detail-article p {
  color: #374151;
  line-height: 1.9;
}

.poster-card {
  min-height: 430px;
  border-radius: 24px;
  background-color: #dbeafe;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
}

.info-card dt {
  color: var(--text-muted);
  font-weight: 800;
}

.info-card dd {
  color: var(--text-main);
  font-weight: 700;
}

.info-card dd span {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.search-page-form {
  width: min(620px, 100%);
  margin-top: 24px;
}

.search-page-form input {
  width: 100%;
  padding: 14px 18px;
}

.search-empty {
  padding: 32px;
  border: 1px dashed #bfdbfe;
  border-radius: 22px;
  color: var(--text-muted);
  background: #eff6ff;
  text-align: center;
  font-weight: 800;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fafb, #eef2ff);
}

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

.footer-grid h2,
.footer-grid h3 {
  color: var(--text-main);
  font-weight: 900;
}

.footer-grid h2 {
  font-size: 24px;
}

.footer-grid h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.footer-grid p {
  max-width: 640px;
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
}

.footer-grid a:hover {
  color: var(--blue);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(203, 213, 225, 0.9);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

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

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

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

  .featured-grid,
  .movie-grid,
  .movie-grid.large-list,
  .mini-grid,
  .category-row,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .poster-card {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .hero-carousel {
    min-height: 560px;
    height: auto;
  }

  .hero-content {
    width: 100%;
    padding: 46px 28px 72px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-nav {
    top: auto;
    bottom: 18px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    transform: none;
  }

  .hero-nav.prev {
    left: 18px;
  }

  .hero-nav.next {
    right: 18px;
  }

  .hero-dots {
    bottom: 32px;
  }

  .featured-grid,
  .movie-grid,
  .movie-grid.large-list,
  .mini-grid,
  .category-row,
  .category-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero,
  .category-showcase,
  .detail-article,
  .info-card {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 44px 56px 1fr;
  }

  .rank-meta {
    grid-column: 2 / -1;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .container,
  .page-shell,
  .detail-shell,
  .header-inner,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

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

  .featured-grid,
  .movie-grid,
  .movie-grid.large-list,
  .mini-grid,
  .category-row,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-cover {
    aspect-ratio: 16 / 10;
  }

  .poster-card {
    min-height: 300px;
  }

  .player-overlay span {
    width: 66px;
    height: 66px;
  }
}
