:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(30, 41, 59, 0.56);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --sky: #38bdf8;
  --blue: #2563eb;
  --yellow: #facc15;
  --red: #fb7185;
  --green: #4ade80;
  --radius: 18px;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.13), transparent 32rem), linear-gradient(180deg, #0f172a 0%, #020617 45%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 35px rgba(56, 189, 248, 0.22);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 1.14rem;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  transform: translateY(-1px);
}

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

.home-hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

.hero-seo-title {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

.hero-seo-title h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  color: rgba(255, 255, 255, 0.96);
}

.hero-seo-title p {
  max-width: 620px;
  margin: 20px 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 1.08rem;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 5s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.78)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.04) 45%, rgba(2, 6, 23, 0.66) 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
  padding-top: 210px;
  padding-bottom: 90px;
}

.hero-text {
  max-width: 670px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-text h2,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 5vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-text p,
.page-hero p {
  max-width: 700px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.hero-actions,
.detail-meta,
.filter-row,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: white;
  box-shadow: 0 16px 38px rgba(14, 165, 233, 0.26);
}

.btn-glass {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
  width: 48px;
  background: var(--sky);
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.42);
  border-block: 1px solid rgba(148, 163, 184, 0.09);
}

.section-search {
  padding: 44px 0 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading span {
  color: var(--yellow);
  font-size: 1.35rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.section-heading a {
  margin-left: auto;
  color: var(--sky);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.56);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
  transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.012);
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 24px 55px rgba(14, 165, 233, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(37, 99, 235, 0.08));
}

.poster-wrap img,
.rank-poster img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08) 58%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #020617;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-info {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-info strong {
  min-height: 2.8em;
  color: white;
  font-size: 1.02rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info span {
  min-height: 3.05em;
  color: var(--muted-strong);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
  display: none;
}

.movie-card-compact .movie-info span {
  min-height: 0;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  min-width: min(420px, 100%);
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.68);
  color: white;
}

.search-box input:focus {
  border-color: rgba(56, 189, 248, 0.58);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.5);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.76);
  border-color: rgba(56, 189, 248, 0.3);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #f43f5e, #f97316);
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
}

.rank-poster {
  width: 92px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info span {
  color: var(--muted-strong);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
}

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

.category-tile,
.category-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.74));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 154px;
  padding: 22px;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.34);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.82));
}

.category-tile strong,
.category-card-main strong {
  font-size: 1.3rem;
}

.category-tile span,
.category-card-main span,
.category-samples a {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.category-card {
  overflow: hidden;
}

.category-card-main {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.35);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 64px;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 30rem), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.compact-hero h1 {
  max-width: 900px;
}

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

.filter-pill {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--muted-strong);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filter-pill:hover,
.filter-pill.is-active {
  background: rgba(56, 189, 248, 0.16);
  color: white;
  border-color: rgba(56, 189, 248, 0.45);
}

.detail-page {
  padding: 42px 0 76px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.detail-main h1 {
  margin: 24px 0 14px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin-bottom: 24px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.7);
  color: var(--muted-strong);
  font-size: 0.86rem;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: black;
  box-shadow: var(--shadow);
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 1;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.48));
  color: white;
  text-align: center;
  cursor: pointer;
}

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

.player-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #020617;
  font-size: 2.2rem;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
  transition: transform 0.2s ease;
}

.player-overlay:hover .player-button {
  transform: scale(1.06);
}

.content-box {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.52);
}

.content-box h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.content-box p {
  margin: 0;
  color: var(--muted-strong);
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 100px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.side-box {
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0 34px;
}

.footer-about p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

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

.site-footer li,
.footer-bottom {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-bottom {
  padding: 18px 0 28px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

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

  .category-grid,
  .category-card-grid,
  .long-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-side {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
  }

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

  .nav-link {
    padding: 10px 8px;
  }

  .hero-seo-title {
    top: 92px;
  }

  .hero-seo-title h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .home-hero {
    min-height: 760px;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

  .movie-grid,
  .dense-grid,
  .ranking-list,
  .long-ranking,
  .category-grid,
  .category-card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-heading a {
    width: 100%;
    margin-left: 0;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info strong {
    font-size: 0.95rem;
  }

  .movie-info span {
    display: none;
  }

  .ranking-item {
    grid-template-columns: auto 72px 1fr;
    gap: 10px;
  }

  .rank-poster {
    width: 72px;
  }

  .rank-info span {
    display: none;
  }

  .player-button {
    width: 66px;
    height: 66px;
  }
}
