:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(14, 165, 233, 0.22);
  --line-strong: rgba(14, 165, 233, 0.42);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #64748b;
  --sky: #38bdf8;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --shadow: 0 28px 70px rgba(2, 132, 199, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 82% 2%, rgba(34, 211, 238, 0.14), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid rgba(12, 74, 110, 0.45);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.92));
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.14);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--sky), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #22d3ee);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a,
.nav-dropdown button {
  color: #cbd5e1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: var(--sky);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 18px);
  left: -18px;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: rgba(14, 165, 233, 0.12);
}

.search-box {
  position: relative;
  display: flex;
  width: min(320px, 28vw);
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 16px;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.search-box button {
  border: 0;
  padding: 0 16px;
  color: white;
  background: linear-gradient(90deg, #0284c7, #0891b2);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  color: var(--sky);
  background: rgba(14, 165, 233, 0.12);
}

.main-offset {
  padding-top: 68px;
}

.hero-carousel {
  position: relative;
  height: min(760px, 72vh);
  min-height: 520px;
  overflow: hidden;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 26%, rgba(2, 6, 23, 0.4) 64%, rgba(2, 6, 23, 0.88) 100%),
    linear-gradient(0deg, #020617 0%, transparent 32%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1280px, calc(100% - 32px));
  transform: translate(-50%, -46%);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: white;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta a,
.hero-meta span {
  padding: 6px 12px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.2);
  backdrop-filter: blur(8px);
}

.hero-tags {
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(90deg, #0284c7, #06b6d4);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.42);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-control {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.56);
  cursor: pointer;
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.hero-control:hover {
  background: rgba(14, 165, 233, 0.4);
  transform: translateY(-50%) scale(1.08);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--sky), var(--cyan));
}

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

.page-main {
  padding: 104px 0 64px;
}

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

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

.section-head h2,
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-head p,
.page-head p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  color: var(--sky);
  font-weight: 700;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(12, 74, 110, 0.28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42));
  box-shadow: 0 18px 52px rgba(2, 6, 23, 0.3);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.52);
  box-shadow: 0 22px 58px rgba(14, 165, 233, 0.13);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 55%);
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: white;
  background: rgba(14, 165, 233, 0.78);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: all 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

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

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

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

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--soft);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
}

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

.category-tile {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.42));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.55);
}

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

.category-tile p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile span {
  color: var(--sky);
  font-weight: 800;
}

.rank-panel {
  padding: 28px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.18), rgba(15, 23, 42, 0.76));
  box-shadow: 0 22px 70px rgba(120, 53, 15, 0.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(12, 74, 110, 0.2);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(251, 191, 36, 0.42);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  font-weight: 900;
  font-size: 20px;
}

.rank-item img {
  width: 64px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text {
  min-width: 0;
}

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

.rank-text strong {
  color: #f8fafc;
}

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding: 28px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 34px;
  background:
    radial-gradient(circle at 22% 10%, rgba(14, 165, 233, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

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

.breadcrumb a:hover {
  color: var(--sky);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-list span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.14);
}

.detail-line {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.36);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #22d3ee);
  box-shadow: 0 0 46px rgba(14, 165, 233, 0.55);
  font-size: 30px;
  text-indent: 4px;
  transition: transform 0.2s ease;
}

.player-cover:hover span {
  transform: scale(1.08);
}

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

.article-panel {
  margin-top: 34px;
  padding: 30px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.56);
}

.article-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.article-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
}

.search-result-status {
  color: var(--muted);
  margin-bottom: 22px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(12, 74, 110, 0.32);
  background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #cbd5e1;
}

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

.empty-box {
  padding: 72px 24px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 26px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.48);
}

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

  .detail-hero {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .desktop-nav,
  .search-box {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-carousel {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .footer-inner,
  .section-head,
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .logo {
    font-size: 15px;
  }

  .hero-content {
    top: 52%;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .movie-grid,
  .category-board,
  .rank-list {
    gap: 14px;
  }

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

  .movie-card h3 {
    font-size: 14px;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-item img {
    display: none;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .article-panel,
  .detail-hero,
  .rank-panel {
    padding: 18px;
    border-radius: 22px;
  }
}
