:root {
  --yellow: #facc15;
  --yellow-strong: #eab308;
  --orange: #f97316;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fefce8 0%, #ffffff 36%, #fff7ed 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #facc15, #fb923c, #eab308);
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.25);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  font-size: 15px;
}

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

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fef9c3;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: #ffffff;
  font-weight: 650;
}

.mobile-nav.is-open {
  display: grid;
}

.home-hero {
  padding: 32px 0 16px;
}

.hero-carousel {
  position: relative;
  height: 580px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: 56px;
  color: #ffffff;
}

.hero-label,
.eyebrow,
.main-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  font-weight: 800;
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 32px;
  font-size: 20px;
  line-height: 1.75;
  color: #e5e7eb;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions,
.search-controls,
.catalog-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.section-action,
.search-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-controls button {
  border: 0;
  background: var(--yellow);
  color: #111827;
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.35);
}

.primary-btn:hover,
.search-controls button:hover,
.section-action:hover {
  transform: translateY(-2px);
  background: var(--yellow-strong);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

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

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

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

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

.content-section,
.search-panel-section {
  padding: 56px 0;
}

.soft-section {
  background: linear-gradient(135deg, rgba(254, 249, 195, 0.76), rgba(255, 237, 213, 0.72));
  border-radius: 34px;
  width: min(100% - 24px, 1340px);
  margin: 24px auto;
}

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

.section-heading h2,
.search-panel h2,
.side-card h2,
.article-block h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p,
.search-panel p,
.page-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-action {
  flex: none;
  background: #ffffff;
  color: #111827;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

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

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

.masonry-grid {
  columns: 4 230px;
  column-gap: 24px;
}

.masonry-grid .movie-card {
  break-inside: avoid;
  margin-bottom: 24px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.region-pill,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  right: 12px;
  left: auto;
  min-width: 34px;
  text-align: center;
  background: rgba(0, 0, 0, 0.74);
  color: #ffffff;
}

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body a:hover {
  color: #ca8a04;
}

.card-body p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.detail-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.detail-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  padding: 5px 9px;
}

.compact-card .poster-link {
  aspect-ratio: 16 / 10;
}

.search-panel {
  padding: 30px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-controls {
  margin-top: 22px;
}

.search-controls input,
.search-controls select,
.catalog-tools input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 18px;
  outline: none;
}

.search-controls input,
.catalog-tools input {
  flex: 1 1 280px;
}

.search-controls input:focus,
.search-controls select:focus,
.catalog-tools input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.search-result-item img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-item strong {
  display: block;
  margin-bottom: 5px;
}

.search-result-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.category-tile {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
}

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

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

.category-tile span {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 22px 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.category-tile em {
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.6;
}

.small-tiles .category-tile {
  min-height: 136px;
}

.rail-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.rail-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
  font-size: 28px;
}

.wide-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.wide-rail::-webkit-scrollbar {
  display: none;
}

.wide-card {
  flex: 0 0 310px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.09);
}

.wide-card a:first-child {
  position: relative;
  display: block;
  height: 178px;
  overflow: hidden;
}

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

.wide-card a:first-child span {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.wide-card div {
  padding: 16px;
}

.wide-card h3 {
  margin: 0 0 8px;
}

.wide-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wide-card small {
  color: var(--muted);
}

.page-hero {
  padding: 60px 0 38px;
  color: #111827;
  background: radial-gradient(circle at 15% 0%, rgba(250, 204, 21, 0.36), transparent 32%), linear-gradient(135deg, #fffbeb, #ffffff 52%, #fff7ed);
}

.compact-hero h1,
.category-hero h1 {
  max-width: 940px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.catalog-tools {
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.ranking-features {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}

.ranking-feature {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  padding: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  position: relative;
}

.ranking-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.15));
}

.ranking-feature span,
.ranking-feature strong,
.ranking-feature em {
  position: relative;
  z-index: 2;
}

.ranking-feature span {
  width: fit-content;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  padding: 6px 12px;
  font-weight: 800;
}

.ranking-feature strong {
  margin: 14px 0 8px;
  font-size: 26px;
}

.ranking-feature em {
  font-style: normal;
  line-height: 1.6;
  color: #e5e7eb;
}

.detail-section {
  padding: 28px 0 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 30px;
  align-items: start;
}

.detail-main,
.side-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.45);
  font-size: 34px;
}

.detail-content {
  padding: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.detail-tags span {
  font-size: 13px;
  font-weight: 650;
}

.detail-tags .main-badge {
  background: var(--yellow);
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.detail-meta {
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.article-block p {
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
  margin: 0 0 14px;
  white-space: pre-line;
}

.article-block .lead-text {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

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

.side-card {
  padding: 22px;
}

.side-card h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 9px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: #f9fafb;
}

.related-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.related-card strong,
.related-card em {
  display: block;
}

.related-card strong {
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
}

.site-footer {
  margin-top: 52px;
  color: #ffffff;
  background: linear-gradient(180deg, #111827, #000000);
}

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

.footer-logo {
  margin-bottom: 14px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 18px;
}

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

.footer-grid a {
  display: block;
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .category-grid,
  .search-results,
  .ranking-features,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

  .site-logo {
    font-size: 20px;
  }

  .hero-carousel {
    height: 520px;
    border-radius: 20px;
  }

  .hero-content {
    padding: 32px 26px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .hero-dots {
    bottom: 32px;
  }

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

  .movie-grid,
  .rank-grid,
  .category-grid,
  .search-results,
  .ranking-features,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-panel {
    padding: 22px;
  }

  .search-controls input,
  .search-controls select,
  .search-controls button,
  .catalog-tools input {
    width: 100%;
    flex-basis: 100%;
  }

  .rail-shell {
    grid-template-columns: 1fr;
  }

  .rail-btn {
    display: none;
  }

  .wide-card {
    flex-basis: 280px;
  }

  .detail-content {
    padding: 22px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
