:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.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.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.nav-shell {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.12);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #22d3ee;
}

.menu-toggle {
  display: none;
  color: #fff;
  font-size: 24px;
  background: transparent;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
}

.hero {
  position: relative;
  min-height: 70vh;
  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,
.detail-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 75% 30%, rgba(6, 182, 212, 0.18), transparent 36%), #0f172a;
}

.hero-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 80px 0 96px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  color: #fff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}

.hero p,
.page-hero p,
.detail-copy p {
  color: #cbd5e1;
  font-size: clamp(16px, 2.5vw, 22px);
  line-height: 1.8;
  margin: 0 0 24px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #cbd5e1;
  margin-bottom: 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.28);
  font-weight: 800;
  font-size: 13px;
}

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

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

.btn-primary {
  color: #fff;
  background: #06b6d4;
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.btn-ghost:hover {
  border-color: rgba(103, 232, 249, 0.65);
  color: #fff;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #22d3ee;
}

.main-block {
  padding: 64px 0;
}

.section {
  margin-bottom: 70px;
}

.section.panel {
  padding: 32px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.24), rgba(8, 145, 178, 0.2));
  box-shadow: var(--shadow);
}

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

.section-head h2 {
  color: #fff;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900;
  margin: 0 0 6px;
}

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

.section-more {
  color: #22d3ee;
  font-weight: 900;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.28), 0 20px 42px rgba(0, 0, 0, 0.32);
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at 35% 20%, rgba(6, 182, 212, 0.26), transparent 35%), #0f172a;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-link:hover .media-frame img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.1));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-link:hover .card-shade {
  opacity: 1;
}

.play-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #06b6d4;
  color: #fff;
  font-size: 24px;
  transform: scale(0.82);
  transition: transform 0.25s ease;
}

.card-link:hover .play-mark {
  transform: scale(1);
}

.duration-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  color: #fff;
  min-height: 2.8em;
  margin: 0 0 8px;
  font-weight: 900;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card-link:hover .card-title {
  color: #22d3ee;
}

.card-desc {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.7;
  min-height: 3.4em;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span:last-child {
  color: #22d3ee;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span,
.keyword-list a {
  padding: 4px 8px;
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.9);
  font-size: 12px;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.55);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  margin-bottom: 28px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.search-panel input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  padding: 0 16px;
  color: #fff;
  background: #0f172a;
  border: 1px solid #334155;
  outline: none;
}

.search-panel input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.9);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.filter-chip.active,
.filter-chip:hover {
  background: #06b6d4;
  color: #fff;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 56px;
  background: radial-gradient(circle at 78% 18%, rgba(6, 182, 212, 0.16), transparent 35%), #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(0deg, #0f172a, transparent);
  pointer-events: none;
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 22px;
}

.breadcrumb a {
  color: #67e8f9;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-info h3 {
  color: #fff;
  font-weight: 900;
  margin: 0 0 4px;
}

.rank-info p {
  color: #94a3b8;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.rank-score {
  color: #facc15;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
}

.detail-bg {
  opacity: 0.62;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

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

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
}

.article-panel,
.side-panel,
.player-card {
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.article-panel,
.side-panel {
  padding: 26px;
}

.article-panel h2,
.side-panel h2,
.player-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.article-panel p,
.side-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0 0 18px;
}

.player-card {
  overflow: hidden;
  margin-bottom: 34px;
}

.player-head {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.player-head h2 {
  margin: 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #06b6d4;
  color: #fff;
  font-size: 42px;
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.28);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 14px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.related-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

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

.related-list strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.related-list span {
  color: #94a3b8;
  font-size: 12px;
}

.site-footer {
  background: #0f172a;
  border-top: 1px solid #334155;
  color: #cbd5e1;
}

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

.footer-grid p,
.footer-grid a {
  color: #94a3b8;
  line-height: 1.8;
  font-size: 14px;
}

.footer-grid h3 {
  color: #fff;
  font-weight: 900;
  margin: 0 0 14px;
}

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

.footer-grid a:hover {
  color: #22d3ee;
}

.footer-bottom {
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.hidden-by-filter {
  display: none !important;
}

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

  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: inline-grid;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .main-block {
    padding: 42px 0;
  }

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

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section.panel {
    padding: 22px;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }
}

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

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .card-title {
    min-height: auto;
  }
}
