:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --panel: #ffffff;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f9fafb;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(18px);
}

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

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

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-weight: 650;
}

.nav-link,
.mobile-link {
  transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 9px;
  background: #111827;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald);
  background: #ecfdf5;
}

.hero-section {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

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

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

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

.hero-slide img,
.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(4, 120, 87, 0.92), rgba(8, 145, 178, 0.62), rgba(0, 0, 0, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  max-width: 1240px;
  padding: 72px 0;
}

.hero-kicker,
.section-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(14px);
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 14px;
  max-width: 760px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  margin-top: 0;
  font-size: clamp(28px, 4vw, 48px);
}

.hero-content p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-search {
  display: flex;
  width: min(620px, 100%);
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  outline: 0;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button,
.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.hero-search button,
.primary-button {
  color: var(--emerald-dark);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.hero-search button {
  height: 48px;
  padding: 0 22px;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 20px;
}

.primary-button:hover,
.hero-search button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

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

.hero-actions,
.hero-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.64;
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: #fff;
}

.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.soft-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1240px) / 2));
  padding-right: max(16px, calc((100% - 1240px) / 2));
  background: #eefdf8;
}

.section-head,
.category-overview-head,
.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-label {
  color: var(--emerald-dark);
  background: #d1fae5;
}

.section-head h2,
.category-overview-head h2,
.panel-head h2,
.story-card h2,
.side-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.category-overview-head p {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.movie-card.compact .card-poster {
  height: 184px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 14px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.card-meta a,
.hero-link-row a {
  color: var(--emerald-dark);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.movie-card.compact h3 {
  font-size: 17px;
}

.movie-card p,
.rank-item p,
.story-card p,
.side-card p {
  margin: 0;
  color: var(--muted);
}

.tag-row,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.genre-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
  align-items: start;
}

.ranking-panel,
.side-card,
.story-card,
.player-card,
.tool-panel,
.category-overview-block {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f9fafb;
}

.rank-item strong {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--emerald);
  font-size: 13px;
}

.rank-thumb {
  display: block;
  width: 74px;
  height: 88px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.25;
}

.rank-item p {
  font-size: 13px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.page-hero {
  padding: 88px max(16px, calc((100% - 1240px) / 2));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
    radial-gradient(circle at 10% 70%, rgba(255, 255, 255, 0.18), transparent 26%);
}

.hero-link-row a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.tool-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 26px;
}

.search-box {
  flex: 1 1 320px;
}

.search-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  outline: 0;
  background: #f9fafb;
}

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

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 750;
}

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

.empty-state {
  display: none;
  padding: 30px;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.category-overview-block {
  padding: 24px;
  margin-bottom: 24px;
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  padding: 42px 0 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
}

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

.detail-hero-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

.detail-info h1 {
  margin-bottom: 18px;
}

.detail-line {
  color: rgba(255, 255, 255, 0.9);
}

.detail-tags span,
.detail-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #030712;
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--emerald-dark);
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease;
}

.player-start:hover span {
  transform: scale(1.06);
}

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

.story-card,
.side-card {
  padding: 26px;
}

.story-card h2,
.side-card h2 {
  font-size: 26px;
}

.story-card p + h2 {
  margin-top: 28px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

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

.info-table strong {
  color: var(--muted);
  font-size: 13px;
}

.info-table span {
  font-weight: 800;
}

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

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

.side-list .rank-item {
  grid-template-columns: 78px minmax(0, 1fr);
}

.side-list .rank-item strong {
  display: none;
}

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

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 600px;
  margin: 14px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  max-width: 420px;
}

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

.footer-copy {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: flex;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .listing-grid,
  .mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 740px) {
  .brand-text {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 54px 0 92px;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button {
    width: 100%;
  }

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

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .listing-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-poster,
  .movie-card.compact .card-poster {
    height: 170px;
  }

  .card-body {
    padding: 14px;
  }

  .movie-card h3,
  .movie-card.compact h3 {
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }

  .page-hero {
    padding-top: 62px;
    padding-bottom: 62px;
  }

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

  .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-poster {
    width: 210px;
  }

  .detail-poster img {
    height: 290px;
  }

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

  .rank-item,
  .side-list .rank-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rank-item strong {
    display: none;
  }

  .rank-thumb {
    width: 64px;
    height: 78px;
  }

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

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