:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #ecfdf5;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0f766e;
  --cyan: #0e7490;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.site-nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
  font-size: 13px;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: #374151;
  border-radius: 12px;
  padding: 9px 13px;
  font-weight: 650;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
  background: var(--soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #0f766e, #164e63);
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 70% 30%,
      rgba(16, 185, 129, 0.22),
      transparent 30%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.86) 0%,
      rgba(0, 0, 0, 0.58) 48%,
      rgba(0, 0, 0, 0.16) 100%
    ),
    linear-gradient(0deg, rgba(6, 78, 59, 0.52), transparent 45%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 690px;
  color: #ffffff;
  padding: 76px 0;
}

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.24);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
}

.tag-row span {
  color: var(--emerald-dark);
  background: var(--soft);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.33);
}

.btn-primary:hover {
  background: var(--emerald-dark);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: #ffffff;
}

.intro-band {
  padding: 34px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}

.intro-grid h2,
.section-head h2,
.page-hero h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.intro-grid p,
.page-lead {
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  margin-top: 38px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.82);
}

.search-box input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 18px;
  outline: none;
  font-size: 16px;
  background: #f9fafb;
}

.search-box input:focus {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--emerald);
}

.section {
  padding: 56px 0 0;
}

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

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

.section-head p,
.page-hero p {
  margin: 0 0 6px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head a {
  color: var(--emerald-dark);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

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

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

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46, #164e63);
}

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

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

.quality-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
}

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

.movie-info {
  padding: 16px;
}

.movie-meta span,
.detail-meta span {
  color: #4b5563;
  background: #f3f4f6;
}

.movie-info h3 {
  min-height: 56px;
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--emerald-dark);
}

.movie-info p {
  min-height: 66px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  display: flex;
  align-items: end;
  padding: 24px;
  color: #ffffff;
  background: #064e3b;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.7s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.78),
    rgba(5, 150, 105, 0.26)
  );
}

.category-tile div {
  position: relative;
  z-index: 2;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.65;
}

.rank-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-num,
.rank-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 900;
  border-radius: 14px;
}

.rank-num {
  width: 42px;
  height: 42px;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.page-hero {
  padding: 72px 0 44px;
}

.page-hero.soft {
  background:
    radial-gradient(
      circle at 12% 20%,
      rgba(16, 185, 129, 0.16),
      transparent 28%
    ),
    linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
  border-bottom: 1px solid rgba(209, 250, 229, 0.8);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.page-lead {
  max-width: 820px;
  margin-top: 14px;
  font-size: 18px;
}

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

.rank-card .rank-emblem {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  width: 46px;
  height: 38px;
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.3);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #061a17;
}

.detail-bg,
.detail-bg img,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.1);
  opacity: 0.42;
}

.detail-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42)),
    linear-gradient(0deg, rgba(6, 78, 59, 0.8), rgba(6, 78, 59, 0.15));
}

.detail-inner {
  position: relative;
  z-index: 2;
  padding: 34px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d1d5db;
  font-size: 14px;
  margin-bottom: 28px;
}

.breadcrumb a:hover {
  color: #a7f3d0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.36);
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #065f46, #164e63);
}

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

.detail-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-one {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin-top: 16px;
}

.player-section {
  scroll-margin-top: 82px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.26));
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  transition: opacity 0.2s ease;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.prose-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  border-radius: var(--radius);
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.75);
}

.content-card h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(75, 85, 99, 0.7);
  color: #6b7280;
  text-align: center;
}

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

  .rank-layout,
  .prose-section {
    grid-template-columns: 1fr;
  }

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

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

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-inner {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .intro-grid,
  .detail-layout,
  .footer-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-list a {
    grid-template-columns: 46px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}

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

  .hero,
  .hero-inner {
    min-height: 540px;
  }

  .hero-copy {
    padding: 56px 0;
  }

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

  .hero p,
  .detail-one,
  .page-lead {
    font-size: 16px;
  }

  .movie-grid,
  .rank-grid,
  .related-grid,
  .side-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 42px;
  }

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

  .movie-info h3,
  .movie-info p {
    min-height: auto;
  }

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