:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #ecfdf5;
  --brand: #059669;
  --brand-dark: #047857;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

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

.brand-text strong,
.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.brand-text small {
  color: var(--muted);
  font-size: 0.76rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  position: relative;
  margin-left: auto;
  width: min(340px, 32vw);
}

.site-search,
.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.site-search:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(5, 150, 105, 0.65);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  z-index: 120;
}

.search-results.is-open {
  display: block;
}

.search-results a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.search-results a:hover {
  background: var(--soft);
}

.search-results strong {
  display: block;
  font-size: 0.95rem;
}

.search-results small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--brand-dark);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid #f3f4f6;
  font-weight: 700;
}

.mobile-search {
  position: relative;
  padding: 12px;
}

.hero-slider {
  position: relative;
  height: min(720px, 74vh);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide {
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08)), linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 45%);
}

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

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.hero-tags span,
.detail-meta span,
.detail-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.86rem;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 26px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

main {
  overflow: hidden;
}

.content-section,
.page-main,
.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.content-section.is-soft {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px max(16px, calc((100% - 1280px) / 2));
  background: linear-gradient(180deg, #ffffff, #f3f4f6);
}

.search-band {
  background: #111827;
  color: #ffffff;
}

.search-band-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 36px 0;
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-section h2,
.player-section h2,
.sticky-rank h2,
.side-panel h2 {
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.search-band p,
.section-heading p,
.page-hero p,
.side-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-band p {
  color: #d1d5db;
}

.search-band-box {
  position: relative;
}

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

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-link {
  min-height: 40px;
  color: var(--brand-dark);
  background: var(--soft);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.38);
  box-shadow: var(--shadow);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--brand);
  font-size: 0.78rem;
  font-weight: 850;
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 750;
}

.card-body h3 {
  margin: 7px 0 8px;
  font-size: 1.06rem;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--brand-dark);
}

.card-desc {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 0.93rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-desc.is-compact {
  min-height: 3.2em;
  -webkit-line-clamp: 2;
}

.mini-tags span {
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.76rem;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
}

.category-card strong,
.category-card small {
  position: absolute;
  left: 20px;
  right: 20px;
}

.category-card strong {
  bottom: 60px;
  font-size: 1.4rem;
}

.category-card small {
  bottom: 22px;
  color: #d1d5db;
}

.ranking-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 46px 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  color: var(--brand-dark);
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 62px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy small {
  display: block;
  color: var(--muted);
}

.side-panel,
.sticky-rank {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.side-panel {
  position: sticky;
  top: 96px;
}

.primary-btn.is-wide {
  width: 100%;
  margin-top: 22px;
}

.page-main {
  padding-bottom: 48px;
}

.page-hero {
  margin-top: 32px;
  border-radius: 28px;
  padding: clamp(46px, 8vw, 88px);
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.35), transparent 26%), linear-gradient(135deg, #111827, #065f46);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.page-hero p {
  max-width: 760px;
  color: #d1d5db;
  font-size: 1.08rem;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  min-height: 160px;
  border-radius: 18px;
  background: #111827;
}

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

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-links a {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.sticky-rank {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.compact-rank .ranking-item {
  grid-template-columns: 36px 48px minmax(0, 1fr);
  gap: 10px;
}

.compact-rank .ranking-item img {
  width: 48px;
  height: 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 24px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--brand-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border-radius: 30px;
  padding: 28px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(5, 150, 105, 0.38), transparent 32%), linear-gradient(135deg, #111827, #030712);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 26px 46px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1;
}

.detail-one-line {
  max-width: 820px;
  color: #d1d5db;
  font-size: 1.18rem;
}

.detail-meta {
  margin: 22px 0 14px;
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section,
.detail-section {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.player-section h2,
.detail-section h2 {
  margin-bottom: 18px;
  font-size: 1.8rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

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

.play-icon {
  display: inline-flex;
  width: 86px;
  height: 86px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 2.4rem;
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.28);
}

.article-text p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 1.04rem;
  line-height: 1.9;
}

.inner-heading {
  margin-bottom: 20px;
}

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

.site-footer {
  margin-top: 48px;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 520px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(5, 150, 105, 0.5);
}

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

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

  .ranking-split {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .sticky-rank {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-slider {
    min-height: 600px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band-inner,
  .detail-hero,
  .footer-inner,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text small {
    display: none;
  }

  .hero-slider {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    display: grid;
  }

  .content-section,
  .content-section.is-soft {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    min-height: auto;
    -webkit-line-clamp: 2;
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .detail-section {
    border-radius: 20px;
  }

  .page-hero {
    padding: 34px 22px;
  }

  .detail-hero {
    padding: 18px;
  }

  .detail-copy h1 {
    font-size: 2.25rem;
  }

  .play-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
