:root {
  --site-bg: #f8fafc;
  --site-text: #111827;
  --site-muted: #64748b;
  --site-line: rgba(15, 23, 42, 0.1);
  --site-primary: #0ea5e9;
  --site-primary-dark: #0369a1;
  --site-accent: #f97316;
  --site-card: #ffffff;
  --site-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

body {
  min-height: 100vh;
  background: var(--site-bg);
  color: var(--site-text);
}

a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--site-line);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--site-primary-dark);
  white-space: nowrap;
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.12);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 34vw);
}

.nav-search input,
.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  padding: 0 16px;
  background: #ffffff;
  outline: none;
}

.nav-search input:focus,
.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--site-primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.nav-search button,
.quick-search button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--site-primary);
  color: #ffffff;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--site-line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

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

.hero-overlay,
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.22));
}

.hero-content {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
  padding: 120px 0 92px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.hero-actions,
.quick-links,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags,
.hero-actions,
.detail-meta,
.tag-row {
  margin-top: 22px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
}

.hero .tag-pill,
.detail-hero .tag-pill {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

.btn-glass,
.btn-outline-light {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.btn-glass:hover,
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.quick-search-section {
  margin-top: -54px;
  position: relative;
  z-index: 10;
}

.quick-search-card {
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--site-shadow);
}

.quick-search-card h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 36px);
}

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

.quick-links {
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

.quick-links a:hover {
  color: #ffffff;
  background: var(--site-primary);
}

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

.section-heading h2 {
  margin-bottom: 10px;
  color: #0f172a;
}

.section-heading p {
  max-width: 720px;
  color: var(--site-muted);
}

.section-action,
.text-link {
  color: var(--site-primary-dark);
  font-weight: 800;
}

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

.movie-card {
  height: 100%;
  border: 1px solid var(--site-line);
  background: var(--site-card);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #075985);
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
}

.movie-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.movie-title:hover {
  color: var(--site-primary-dark);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--site-muted);
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-one-line {
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.category-card,
.category-overview-cover {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background-image: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.16)), var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--site-shadow);
}

.category-card span,
.category-overview-cover span {
  width: max-content;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.category-card strong {
  font-size: 22px;
}

.category-card em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
}

.ranking-section {
  background: #0f172a;
  color: #ffffff;
}

.ranking-section .section-heading h2,
.ranking-section .section-heading p,
.ranking-section .section-action {
  color: #ffffff;
}

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

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

.rank-list a {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

.rank-list a:hover {
  background: rgba(14, 165, 233, 0.28);
}

.rank-number {
  color: #fbbf24;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.ranking-poster {
  overflow: hidden;
  background: #ffffff;
  color: #0f172a;
}

.ranking-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.ranking-poster div {
  padding: 20px;
}

.ranking-poster span {
  color: var(--site-primary-dark);
  font-weight: 900;
}

.ranking-poster h3 {
  margin: 10px 0;
}

.site-footer {
  padding: 48px 0 24px;
  background: #020617;
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
}

.footer-logo {
  display: inline-block;
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.48);
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0369a1);
}

.small-hero {
  padding: 92px 0 72px;
}

.category-hero {
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.36)), var(--page-hero-image);
  background-size: cover;
  background-position: center;
}

.page-hero-content {
  padding: 120px 0 100px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.category-overview-card {
  border: 1px solid var(--site-line);
  background: #ffffff;
}

.category-overview-card > div {
  padding: 20px;
}

.category-overview-card h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.category-overview-card p {
  color: #475569;
  margin-bottom: 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.rank-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

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

.rank-card-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 900;
}

.rank-card-body {
  align-self: center;
}

.rank-card-body h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.rank-card-body p {
  margin-top: 12px;
  color: #475569;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  padding: 110px 0 72px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--site-shadow);
}

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

.detail-copy .hero-kicker a {
  color: #e0f2fe;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.player-section {
  background: #020617;
}

.player-root {
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-shell {
  position: relative;
  background: #000000;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.2));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--site-primary);
  box-shadow: 0 0 0 18px rgba(14, 165, 233, 0.22);
}

.play-icon::before {
  content: "";
  display: block;
  margin-left: 6px;
  border-left: 22px solid #ffffff;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.player-button {
  margin: 18px;
}

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

.detail-article,
.detail-side {
  padding: 28px;
  border: 1px solid var(--site-line);
  background: #ffffff;
}

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

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  color: #334155;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
}

.detail-side dt {
  color: var(--site-muted);
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: #0f172a;
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ranking-poster {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-bar {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

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

  .nav-menu {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

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

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

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

@media (max-width: 640px) {
  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 86px;
  }

  .quick-search,
  .footer-grid,
  .rank-card,
  .detail-hero-content {
    grid-template-columns: 1fr;
    display: grid;
  }

  .quick-search {
    gap: 10px;
  }

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

  .rank-list a {
    grid-template-columns: 44px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

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

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