:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #60a5fa);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
}

.brand-name {
  white-space: nowrap;
  font-size: 19px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: #374151;
  border-radius: 999px;
  text-decoration: none;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: var(--brand);
}

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

.top-search input,
.mobile-search input,
.quick-search-panel input,
.search-controls input,
.search-controls select {
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--soft);
  border-radius: 999px;
  outline: none;
}

.top-search input:focus,
.mobile-search input:focus,
.quick-search-panel input:focus,
.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.top-search button,
.mobile-search button,
.quick-search-panel button,
.search-controls button,
.primary-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  font-weight: 700;
  background: var(--brand);
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.quick-search-panel button:hover,
.search-controls button:hover,
.primary-btn:hover,
.text-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  background: #ffffff;
  border: 1px solid var(--soft);
  border-radius: 12px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--soft);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.mobile-panel-links,
.mobile-sub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-sub-link {
  padding: 8px 12px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  text-decoration: none;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 13px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.38);
  border: 1px solid rgba(191, 219, 254, 0.3);
  border-radius: 999px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.tag-row span,
.filter-chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
}

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

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.ghost-btn.dark {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--soft);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.52);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
}

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

.quick-search-panel {
  position: relative;
  z-index: 4;
  width: min(1080px, calc(100% - 32px));
  margin: -42px auto 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-panel form {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.quick-search-panel label {
  font-size: 18px;
  font-weight: 900;
}

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

.quick-search-panel input {
  flex: 1;
  border-radius: 16px;
}

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

.top-space {
  padding-top: 34px;
}

.content-section {
  margin: 64px 0;
}

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

.section-heading h2,
.ranking-panel h2,
.ranking-board h2,
.aside-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.section-more {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

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

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

.hot-grid,
.compact-grid,
.latest-grid,
.all-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  display: block;
  overflow: hidden;
  color: inherit;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.movie-card.is-compact .poster-wrap {
  height: 190px;
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.category-overview-media:hover img,
.small-movie-item:hover img {
  transform: scale(1.07);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
}

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 8px;
}

.movie-card-body {
  display: block;
  padding: 16px;
}

.movie-card-body strong {
  display: block;
  margin-bottom: 8px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-meta-line,
.movie-desc {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 9px 0 12px;
  overflow: hidden;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.category-card img,
.category-overview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12));
}

.category-card-text {
  position: absolute;
  inset: auto 0 0;
  display: block;
  padding: 22px;
}

.category-card-text strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-text em {
  display: block;
  color: #e5e7eb;
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

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

.ranking-panel,
.ranking-board,
.aside-card,
.detail-card,
.search-panel,
.category-overview-card,
.page-hero {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.ranking-panel,
.ranking-board,
.aside-card,
.detail-card,
.search-panel,
.page-hero {
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ranking-list.large {
  max-height: none;
}

.small-movie-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 12px;
  align-items: center;
  color: inherit;
  padding: 8px;
  border-radius: 14px;
  text-decoration: none;
  transition: 0.2s ease;
}

.small-movie-item:hover {
  background: #f3f4f6;
}

.small-movie-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.25s ease;
}

.rank-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: var(--brand);
  border-radius: 12px;
}

.small-movie-text strong,
.small-movie-text em {
  display: block;
}

.small-movie-text strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-links a:hover {
  color: #93c5fd;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.filter-chip-row {
  margin-top: 18px;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

.category-overview-media {
  min-height: 260px;
  overflow: hidden;
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-body h2 a {
  color: inherit;
  text-decoration: none;
}

.category-overview-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

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

.search-controls {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.6fr)) auto;
  gap: 12px;
  margin-bottom: 16px;
}

.search-controls input,
.search-controls select {
  border-radius: 14px;
}

.search-status {
  margin: 12px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #000000;
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-cover-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), rgba(0, 0, 0, 0.72));
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  padding-left: 6px;
  color: #ffffff;
  font-size: 38px;
  background: rgba(37, 99, 235, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
  transform: translate(-50%, -50%);
}

.detail-card {
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
}

.detail-meta span {
  padding: 7px 11px;
  background: #f3f4f6;
  border-radius: 999px;
}

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

.detail-card h2 {
  margin: 24px 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

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

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

  .movie-grid,
  .feature-grid,
  .hot-grid,
  .compact-grid,
  .latest-grid,
  .all-grid,
  .category-grid,
  .ranking-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-aside {
    order: 2;
  }
}

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

  .mobile-menu-button {
    display: flex;
  }

  .site-header-inner {
    height: 64px;
  }

  .hero-slider {
    min-height: 560px;
    height: 74vh;
  }

  .quick-search-panel form,
  .footer-inner,
  .category-overview-card,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .quick-search-panel form > div {
    flex-direction: column;
  }

  .movie-grid,
  .feature-grid,
  .hot-grid,
  .compact-grid,
  .latest-grid,
  .all-grid,
  .category-grid,
  .ranking-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .brand-name {
    font-size: 16px;
  }

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

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

  .page-wrap,
  .hero-content,
  .site-header-inner,
  .footer-inner,
  .mobile-panel,
  .quick-search-panel {
    width: min(100% - 20px, 1280px);
  }

  .movie-grid,
  .feature-grid,
  .hot-grid,
  .compact-grid,
  .latest-grid,
  .all-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card.is-compact .poster-wrap {
    height: 240px;
  }

  .small-movie-item {
    grid-template-columns: auto 64px 1fr;
  }

  .small-movie-item img {
    width: 64px;
    height: 48px;
  }

  .player-start {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
