:root {
  --deep-950: #111821;
  --deep-900: #1b222b;
  --deep-850: #232b35;
  --deep-800: #29323c;
  --deep-700: #313a45;
  --night-900: #142565;
  --night-700: #273b81;
  --night-600: #2e448c;
  --glow-500: #ffcf33;
  --glow-600: #ffca2e;
  --text-main: #ffffff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 207, 51, 0.3);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(46, 68, 140, 0.32), transparent 30rem),
    linear-gradient(180deg, #111821 0%, #1b222b 36%, #111821 100%);
  color: var(--text-main);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

[hidden] {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--deep-700);
  background: rgba(27, 34, 43, 0.95);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--glow-500);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--glow-500);
  color: var(--deep-900);
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--text-soft);
  font-size: 15px;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--glow-500);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--deep-700);
  border-radius: 12px;
  background: rgba(41, 50, 60, 0.8);
  padding: 9px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--text-main);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--deep-700);
  border-radius: 16px;
  background: rgba(27, 34, 43, 0.98);
}

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

main {
  min-height: 70vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(27, 34, 43, 0.96) 0%, rgba(27, 34, 43, 0.72) 42%, rgba(27, 34, 43, 0.12) 100%),
    linear-gradient(0deg, #111821 0%, rgba(17, 24, 33, 0) 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 120px 0 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-eyebrow,
.section-eyebrow,
.movie-meta-line {
  color: var(--glow-500);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  width: min(740px, 100%);
  margin: 18px 0 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero h2 {
  font-size: clamp(34px, 5vw, 62px);
}

.hero p {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.button-primary {
  background: var(--glow-500);
  color: var(--deep-900);
  box-shadow: var(--shadow-glow);
}

.button-primary:hover {
  background: var(--glow-600);
}

.button-secondary {
  background: rgba(46, 68, 140, 0.9);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

.button-ghost {
  background: rgba(27, 34, 43, 0.62);
  color: var(--text-main);
  border-color: var(--deep-700);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.hero-dot {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 58px;
  background: var(--glow-500);
}

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(27, 34, 43, 0.72);
  color: var(--text-main);
  font-size: 22px;
  cursor: pointer;
}

.page-section,
.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 0;
}

.section-panel {
  border: 1px solid rgba(49, 58, 69, 0.9);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(20, 37, 101, 0.5), rgba(41, 50, 60, 0.5));
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 40px);
}

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

.section-header h1,
.section-header h2,
.page-title h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-header p,
.page-title p,
.category-card p,
.story-section p {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(49, 58, 69, 0.9);
  border-radius: var(--radius-md);
  background: rgba(41, 50, 60, 0.74);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--glow-500);
  box-shadow: var(--shadow-glow);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--deep-800);
}

.movie-card-compact .movie-poster {
  aspect-ratio: 16 / 10;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.06);
  opacity: 0.82;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.9);
  color: var(--deep-900);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-glow);
}

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

.movie-year {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  background: rgba(27, 34, 43, 0.82);
  color: var(--glow-500);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

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

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

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

.movie-card p {
  min-height: 48px;
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-list span {
  border-radius: 999px;
  background: rgba(20, 37, 101, 0.58);
  color: var(--text-soft);
  font-size: 12px;
  padding: 4px 9px;
}

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

.category-card {
  min-height: 164px;
  border: 1px solid rgba(49, 58, 69, 0.9);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(46, 68, 140, 0.75), rgba(27, 34, 43, 0.84)),
    radial-gradient(circle at 80% 10%, rgba(255, 207, 51, 0.18), transparent 12rem);
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--glow-500);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 170px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  border: 1px solid var(--deep-700);
  border-radius: 14px;
  background: rgba(27, 34, 43, 0.8);
  color: var(--text-main);
  padding: 0 14px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--glow-500);
}

.mini-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(41, 50, 60, 0.72);
  border: 1px solid rgba(49, 58, 69, 0.84);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.mini-card span {
  display: block;
  padding: 10px 12px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 70px 78px minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(49, 58, 69, 0.86);
  border-radius: 18px;
  background: rgba(41, 50, 60, 0.66);
  padding: 12px;
}

.ranking-index {
  color: var(--glow-500);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

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

.ranking-row h2,
.ranking-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}

.ranking-row p {
  margin: 6px 0 0;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-row .ranking-meta {
  color: var(--text-soft);
  text-align: right;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 96px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(49, 58, 69, 0.9);
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(180deg, rgba(17, 24, 33, 0.12), rgba(17, 24, 33, 0.74));
  color: var(--text-main);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glow-500);
  color: var(--deep-900);
  font-size: 28px;
  box-shadow: var(--shadow-glow);
}

.player-overlay strong {
  font-size: 20px;
}

.detail-info,
.story-section,
.related-section {
  border: 1px solid rgba(49, 58, 69, 0.86);
  border-radius: var(--radius-lg);
  background: rgba(41, 50, 60, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  padding: clamp(20px, 3vw, 30px);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-info .one-line {
  color: var(--text-soft);
  line-height: 1.8;
  margin: 16px 0 0;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.detail-meta div {
  border-radius: 14px;
  background: rgba(27, 34, 43, 0.68);
  padding: 12px;
}

.detail-meta dt {
  color: var(--text-muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--text-main);
  font-weight: 800;
}

.story-section,
.related-section {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
}

.story-section h2,
.related-section h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}

.story-section p + h2 {
  margin-top: 30px;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--deep-700);
  background: rgba(17, 24, 33, 0.72);
}

.site-footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero-content {
    padding-top: 104px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(34px, 11vw, 54px);
  }

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

  .hero-controls {
    align-items: flex-end;
  }

  .section-header,
  .site-footer-inner {
    display: block;
  }

  .section-actions {
    margin-top: 18px;
  }

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

  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .mini-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .ranking-row .ranking-meta {
    grid-column: 3;
    text-align: left;
  }

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

  .footer-links {
    justify-content: flex-start;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .mini-strip {
    grid-template-columns: 1fr;
  }

  .hero-arrows {
    display: none;
  }
}
