:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-600: #059669;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 14px;
  --radius-xl: 22px;
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), #ffffff 32rem);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  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);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  font-weight: 600;
  color: var(--gray-700);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-600);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
}

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.page-main {
  min-height: calc(100vh - var(--header-height));
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 40%, rgba(14, 165, 233, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.82);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.simple-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.simple-hero p,
.detail-copy p {
  margin: 0 0 24px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 600;
}

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

.primary-button {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--primary-700);
  box-shadow: 0 18px 34px rgba(2, 132, 199, 0.34);
}

.primary-button.small {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
}

.ghost-button {
  margin-left: 12px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
  font-size: 28px;
  line-height: 1;
}

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

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

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

.quick-search,
.filter-bar {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.quick-search h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.quick-search p {
  margin: 0;
  color: var(--gray-600);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
  background: var(--gray-50);
}

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

.filter-bar {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.category-chip {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  border-color: var(--primary-200, #bae6fd);
  box-shadow: var(--shadow-md);
}

.category-chip strong {
  font-size: 17px;
}

.category-chip span {
  color: var(--gray-600);
  font-size: 13px;
}

.layout-with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  margin-top: 54px;
}

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

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

.section-head.small {
  align-items: flex-start;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--gray-600);
}

.more-link {
  color: var(--primary-600);
  font-weight: 800;
}

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

.movie-grid.dense .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.0);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.movie-card:hover .play-mask {
  opacity: 1;
  background: rgba(0, 0, 0, 0.36);
}

.badge {
  position: absolute;
  padding: 4px 8px;
  color: #ffffff;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.top-right {
  top: 10px;
  right: 10px;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.card-title {
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-meta {
  overflow: hidden;
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sticky-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.compact-list {
  display: grid;
  gap: 13px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 13px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: var(--gray-50);
}

.compact-card img {
  width: 78px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card strong {
  font-size: 14px;
}

.compact-card em {
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

.rank-num {
  width: 30px;
  color: var(--primary-600);
  font-weight: 900;
}

.wide-link {
  width: 100%;
  margin-top: 18px;
  color: var(--primary-700);
  background: var(--primary-50);
}

.page-hero,
.simple-hero {
  padding: 68px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.35), transparent 30%),
    linear-gradient(135deg, var(--gray-900), var(--primary-700));
}

.simple-hero p {
  color: rgba(255, 255, 255, 0.84);
}

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

.back-link.light {
  color: rgba(255, 255, 255, 0.78);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: var(--radius-xl);
  background: var(--gray-900);
  box-shadow: var(--shadow-md);
}

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

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

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

.category-card-body {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 4px;
  color: #ffffff;
}

.category-card-body strong {
  font-size: 26px;
  font-weight: 900;
}

.category-card-body em,
.category-card-body small {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.empty-state {
  margin-top: 20px;
  padding: 24px;
  color: var(--gray-600);
  text-align: center;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 120px minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.ranking-number {
  color: var(--primary-600);
  font-size: 24px;
  font-weight: 900;
}

.ranking-row img {
  width: 120px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  gap: 4px;
}

.ranking-info strong {
  font-size: 18px;
}

.ranking-info em,
.ranking-info small {
  overflow: hidden;
  color: var(--gray-600);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-score {
  justify-self: end;
  min-width: 54px;
  padding: 6px 10px;
  color: #ffffff;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  font-weight: 900;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: var(--gray-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.06);
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 64px 0;
}

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

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

.detail-copy p {
  color: rgba(255, 255, 255, 0.86);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  padding: 54px 0;
}

.player-card,
.detail-section {
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-large {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.86);
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.34);
  transform: translate(-50%, -50%);
  font-size: 28px;
}

.play-large.hidden {
  display: none;
}

.player-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: var(--gray-600);
}

.detail-section {
  padding: 28px;
}

.detail-section h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.detail-section .tag-list span {
  color: var(--primary-700);
  background: var(--primary-50);
  backdrop-filter: none;
}

.detail-side .compact-card {
  grid-template-columns: 96px minmax(0, 1fr);
}

.detail-side .compact-card img {
  width: 96px;
  height: 64px;
}

.site-footer {
  margin-top: 30px;
  padding: 44px 0;
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid p {
  margin: 0;
  max-width: 560px;
  color: var(--gray-400);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

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

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

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

[hidden] {
  display: none !important;
}

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

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

  .hot-aside,
  .detail-side {
    order: -1;
  }

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

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

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

  .hero {
    min-height: 620px;
  }

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

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

  .hero-controls {
    right: 20px;
    bottom: 22px;
  }

  .quick-search,
  .filter-bar {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 82px;
    height: 58px;
  }

  .ranking-score {
    display: none;
  }

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

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

  .player-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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