:root {
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --teal-700: #0f766e;
  --cyan-800: #155e75;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-700), var(--cyan-800));
  box-shadow: 0 12px 28px rgba(6, 78, 59, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--emerald-700);
  background: #ffffff;
  font-size: 17px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text em {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(236, 253, 245, 0.92);
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #bbf7d0;
  opacity: 1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 2px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.62) 48%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: #ffffff;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  color: rgba(243, 244, 246, 0.92);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald-500);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta,
.info-chips,
.tag-row,
.page-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-meta span,
.info-chip,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--emerald-500);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.28);
}

.primary-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

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

.hero-dots button.is-active {
  background: #ffffff;
}

.stats-strip {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.stats-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.stat-card {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--emerald-600);
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.content-section,
.dark-section,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.dark-section {
  width: 100%;
  max-width: none;
  padding: 74px max(16px, calc((100% - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald-900), var(--teal-700), var(--cyan-800));
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.category-preview h2 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-head-dark p {
  color: rgba(236, 253, 245, 0.86);
}

.section-more {
  color: var(--emerald-700);
  background: #ecfdf5;
}

.section-more.light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 220px) minmax(160px, 220px);
  gap: 14px;
  margin: 0 0 24px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

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

.movie-card:hover .play-mark {
  opacity: 1;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.card-body h3 a:hover {
  color: var(--emerald-600);
}

.card-desc {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

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

.category-tile {
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, background 0.25s ease;
}

.content-section .category-tile {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}

.category-tile:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.24);
}

.content-section .category-tile:hover {
  background: #ecfdf5;
}

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

.category-tile strong {
  color: var(--emerald-500);
}

.category-tile em {
  color: inherit;
  opacity: 0.72;
  font-size: 13px;
  line-height: 1.7;
  font-style: normal;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 48px 58px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 10px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.rank-no {
  color: var(--emerald-600);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-list img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 900;
}

.rank-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.home-categories,
.previews {
  display: grid;
  gap: 24px;
}

.home-category-block,
.category-preview,
.side-box,
.text-card,
.detail-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}

.home-category-block,
.category-preview {
  padding: 22px;
}

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

.block-title h3,
.block-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.block-title a {
  color: var(--emerald-600);
  text-decoration: none;
  font-weight: 800;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.mini-card img {
  width: 58px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.mini-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  padding: 74px 0 34px;
}

.page-hero h1 {
  max-width: 860px;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.category-hero {
  min-height: 300px;
}

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

.ranking-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 70px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
}

.ranking-index {
  color: var(--emerald-600);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-card img {
  width: 92px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-info strong,
.ranking-info em,
.ranking-info small {
  display: block;
}

.ranking-info strong {
  font-size: 20px;
  font-weight: 900;
}

.ranking-info em {
  margin: 6px 0;
  color: var(--emerald-700);
  font-style: normal;
}

.ranking-info small {
  color: var(--muted);
  line-height: 1.7;
}

.player-area {
  background: #020617;
  padding: 22px 0;
}

.player-shell {
  position: relative;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
}

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

.player-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 36px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.breadcrumb a {
  color: var(--emerald-700);
  text-decoration: none;
}

.detail-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px;
  margin-bottom: 22px;
}

.detail-poster img {
  width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.info-chip {
  color: var(--text);
  background: #f3f4f6;
}

.info-chip.green {
  color: #047857;
  background: #d1fae5;
}

.info-chip.blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.info-chip.purple {
  color: #7e22ce;
  background: #f3e8ff;
}

.tag-row {
  margin-top: 18px;
}

.tag-row span {
  color: var(--muted);
  background: #f9fafb;
  border: 1px solid var(--line);
}

.text-card {
  padding: 24px;
  margin-bottom: 22px;
}

.text-card h2,
.side-box h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.text-card p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

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

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
}

.info-grid span {
  color: var(--muted);
}

.info-grid strong {
  color: var(--text);
}

.side-box {
  position: sticky;
  top: 94px;
  padding: 20px;
}

.side-list {
  grid-template-columns: 1fr;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #d1d5db;
  text-decoration: none;
}

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

.footer-bottom {
  padding: 18px 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

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

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

  .side-box {
    position: static;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border-radius: 18px;
    background: rgba(6, 78, 59, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .main-nav a:hover,
  .main-nav a.is-active {
    background: rgba(255, 255, 255, 0.1);
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.28));
  }

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

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

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

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

  .detail-poster img {
    width: min(260px, 100%);
  }
}

@media (max-width: 560px) {
  .nav-wrap {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content,
  .content-section,
  .page-hero {
    width: min(100% - 24px, 1180px);
  }

  .stats-grid,
  .movie-grid,
  .movie-grid-home,
  .movie-grid-related,
  .category-grid,
  .mini-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 48px 0;
  }

  .ranking-card a {
    grid-template-columns: 48px 72px 1fr;
    gap: 12px;
  }

  .ranking-card img {
    width: 72px;
    height: 96px;
  }

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