
:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --accent-50: #fff7ed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 24px 55px rgba(15, 23, 42, 0.18);
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
}

* {
  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 42%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-800));
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.22);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

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

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

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--gray-700);
  border-radius: 99px;
}

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

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

.mobile-link {
  padding: 9px 0;
  font-weight: 700;
  color: var(--gray-700);
}

main {
  min-height: 60vh;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.50) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, calc(100vw - 48px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  padding: 6px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.9);
  font-size: 14px;
  font-weight: 700;
}

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

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 6px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  background: var(--primary-700);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.btn-soft {
  color: var(--primary-700);
  background: #ffffff;
}

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

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-dots {
  position: absolute;
  bottom: 48px;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.search-band {
  margin: -32px auto 64px;
  padding: 22px;
  position: relative;
  z-index: 4;
  display: grid;
  gap: 16px;
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-xl);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-box input,
.filter-panel input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-900);
  background: #ffffff;
  outline: none;
}

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

.search-box button {
  min-width: 112px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary-600);
  cursor: pointer;
  font-weight: 800;
}

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

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 700;
}

.content-stack {
  padding: 48px 0 80px;
}

.content-section {
  margin-bottom: 78px;
}

.section-soft {
  padding: 36px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(90deg, var(--primary-50), var(--accent-50));
}

.dark-section {
  padding: 36px;
  border-radius: var(--radius-2xl);
  color: #ffffff;
  background: var(--gray-900);
}

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

.section-head h2,
.side-panel h2,
.info-panel h2,
.footer-group h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.dark-section .section-head p {
  color: var(--gray-400);
}

.section-head a {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

.dark-section .section-head a {
  color: var(--primary-400);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

.movie-card-compact .movie-cover {
  aspect-ratio: 2 / 3;
}

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

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

.movie-badge,
.rank-corner {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.70);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.movie-badge {
  right: 12px;
}

.rank-corner {
  left: 12px;
  background: var(--primary-600);
}

.hover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

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

.movie-card-body {
  padding: 20px;
}

.movie-card h3 {
  min-height: 1.35em;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 {
  color: var(--primary-600);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 700;
}

.tag-row span {
  padding: 5px 8px;
  color: var(--gray-600);
  background: var(--gray-100);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: var(--gray-900);
  box-shadow: var(--shadow-md);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.45s ease;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.80));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 86px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.rank-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  font-weight: 900;
}

.rank-row img {
  width: 86px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row small {
  color: var(--gray-400);
  white-space: nowrap;
}

.sub-page {
  padding-top: 64px;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

.page-hero h1,
.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-card-large {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 170px;
  background: var(--gray-900);
}

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

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

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-body p {
  margin: 0 0 16px;
  color: var(--gray-600);
}

.category-card-body span {
  color: var(--primary-600);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  cursor: pointer;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--primary-600);
}

.empty-state {
  display: none;
  text-align: center;
  color: var(--gray-500);
  font-weight: 700;
  padding: 40px 0;
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 410px;
  display: flex;
  align-items: end;
  overflow: hidden;
  color: #ffffff;
  background: var(--gray-900);
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(1px);
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.20), rgba(17, 24, 39, 0.96));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  padding: 82px 0 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 28px;
  padding: 42px 0 86px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-card,
.info-panel,
.side-panel,
.poster-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.player-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  background: #000000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  font-weight: 900;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-big {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 36px;
  box-shadow: var(--shadow-xl);
}

.info-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.title-row a {
  color: var(--primary-600);
  font-weight: 900;
  white-space: nowrap;
}

.meta-pills {
  margin-bottom: 20px;
}

.meta-pills span {
  padding: 6px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.lead-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
}

.info-panel p {
  color: var(--gray-700);
}

.detail-tags a {
  padding: 8px 12px;
  color: var(--primary-700);
  background: var(--primary-50);
}

.detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.poster-card {
  padding: 18px;
  position: sticky;
  top: 88px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.poster-card .btn {
  width: 100%;
}

.side-panel {
  padding: 20px;
}

.side-panel h2 {
  font-size: 22px;
  margin-bottom: 16px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

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

.small-card img {
  width: 112px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.small-card span {
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.footer-logo {
  color: #ffffff;
  margin-bottom: 16px;
}

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

.footer-group h2 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 14px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

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

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

  .poster-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 600px;
  }

  .hero-copy {
    margin: 0 24px;
  }

  .hero-controls {
    right: 24px;
    bottom: 24px;
  }

  .hero-dots {
    left: 24px;
    bottom: 32px;
  }

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

  .movie-grid-3,
  .movie-grid-4,
  .category-grid,
  .category-list-grid,
  .rank-list,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .rank-row {
    grid-template-columns: 36px 74px 1fr;
  }

  .rank-row small {
    display: none;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: calc(100% - 32px);
    padding-left: 0;
    padding-right: 0;
  }

  .brand-text {
    font-size: 18px;
  }

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

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

  .hero-actions,
  .search-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .btn,
  .search-box button {
    width: 100%;
  }

  .movie-grid-3,
  .movie-grid-4,
  .category-grid,
  .category-list-grid,
  .rank-list,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-soft,
  .dark-section,
  .info-panel {
    padding: 22px;
  }

  .category-thumbs {
    min-height: 120px;
  }
}
