:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #ea580c;
  --secondary-soft: #ffedd5;
  --dark: #0f172a;
  --dark-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --page: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

.section-container {
  width: min(1280px, 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(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: var(--soft-shadow);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--dark-soft);
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  background: #f1f5f9;
  color: var(--dark);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--dark-soft);
  font-weight: 700;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary);
  background: #eff6ff;
}

.hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.28), transparent 28%), radial-gradient(circle at 92% 18%, rgba(234, 88, 12, 0.24), transparent 30%), linear-gradient(135deg, #0f172a, #172554 48%, #111827);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 260px;
  background: rgba(255, 255, 255, 0.07);
  filter: blur(40px);
  transform: rotate(-3deg);
}

.hero-stage {
  position: relative;
  z-index: 2;
  min-height: 580px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 42px;
  min-height: 580px;
  padding: 52px 0;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.30);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--primary);
  background: #eff6ff;
}

.hero-poster {
  position: relative;
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 12% -8% -8% 14%;
  z-index: -1;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.65), rgba(234, 88, 12, 0.56));
  border-radius: 32px;
  filter: blur(2px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hero-card {
  position: absolute;
  left: -32px;
  bottom: 32px;
  width: min(280px, 86%);
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

.hero-card strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 18px;
}

.hero-card span {
  color: #cbd5e1;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 30px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 26px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 46px;
  background: #fff;
}

.section-block {
  padding: 70px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--dark);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  outline: none;
  font-size: 15px;
}

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

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

.category-card {
  min-height: 158px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.045);
}

.poster-link em,
.rank-badge {
  position: absolute;
  z-index: 2;
  font-style: normal;
  font-weight: 800;
}

.poster-link em {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 12px;
}

.rank-badge {
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 12px;
}

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

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  padding: 56px 0 34px;
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.breadcrumb {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 34px;
  align-items: start;
  padding-top: 48px;
}

.detail-poster {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-card .lead {
  margin: 0 0 20px;
  color: var(--dark-soft);
  font-size: 18px;
  line-height: 1.85;
}

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

.info-list div {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.info-list b {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}

.article-block {
  margin-top: 26px;
}

.article-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: var(--dark-soft);
  line-height: 1.9;
}

.player-section {
  padding-top: 54px;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 30px;
  box-shadow: 0 30px 75px rgba(15, 23, 42, 0.30);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15), rgba(0, 0, 0, 0.72));
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 999px;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.45);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 94px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  font-weight: 900;
}

.rank-item img {
  width: 94px;
  height: 126px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #ffedd5);
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.empty-result {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.empty-result.is-visible {
  display: block;
}

.site-footer {
  margin-top: 76px;
  padding: 54px 0;
  color: #cbd5e1;
  background: var(--dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a:hover {
  color: #fff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .hero-poster {
    max-width: 420px;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 78px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .section-container {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 20px;
  }

  .hero,
  .hero-stage,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 38px 0 72px;
  }

  .hero-card {
    left: 14px;
    bottom: 14px;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 70px 1fr;
    gap: 12px;
  }

  .rank-item img {
    width: 70px;
    height: 96px;
  }
}
