:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --black: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(253, 230, 138, 0.8);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--amber-700);
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

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

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--amber-700);
  background: var(--amber-50);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-50);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-700);
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--amber-100);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  display: block;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 40%, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.52), rgba(217, 119, 6, 0.25));
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 14px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-weight: 700;
}

.hero-content h1 {
  width: min(720px, 100%);
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-content p {
  width: min(660px, 100%);
  margin: 0 0 28px;
  font-size: clamp(17px, 2vw, 23px);
  color: #fff7ed;
}

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

.primary-button,
.ghost-button,
.row-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-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.25);
}

.primary-button.light {
  color: var(--amber-700);
  background: var(--white);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.primary-button:hover,
.ghost-button:hover,
.row-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

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

.hero-dot {
  width: 38px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.warm-section {
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-link {
  flex: 0 0 auto;
  color: var(--amber-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(253, 230, 138, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--amber-200);
  box-shadow: var(--shadow-strong);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.feature-grid .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.year-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: var(--amber-700);
  background: rgba(255, 255, 255, 0.92);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--red-500);
}

.movie-card-body {
  padding: 18px;
}

.movie-card.compact .movie-card-body {
  padding: 13px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card.compact h3 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.movie-card h3 a:hover {
  color: var(--amber-700);
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card.compact .movie-line {
  min-height: 39px;
  font-size: 13px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 4px 8px;
  background: var(--gray-100);
  border-radius: 999px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  color: var(--amber-700);
  background: var(--amber-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card,
.category-overview-card a {
  display: block;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25), transparent 28%),
    linear-gradient(135deg, var(--amber-500), var(--orange-500));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-strong);
}

.category-card span,
.category-overview-body h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 850;
}

.category-card strong,
.category-overview-body p {
  font-size: 14px;
  color: #fff7ed;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.page-hero {
  padding: 76px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, var(--amber-600), var(--orange-500));
}

.simple-hero,
.category-hero,
.ranking-hero,
.search-hero {
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
}

.page-hero h1 {
  width: min(850px, 100%);
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  width: min(820px, 100%);
  margin: 0;
  font-size: 18px;
  color: #fff7ed;
}

.cta-band {
  padding: 72px 0;
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
}

.cta-band p {
  width: min(720px, 100%);
  margin: 0 auto 24px;
  color: #fff7ed;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ranking-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--orange-500));
  font-weight: 900;
}

.ranking-poster img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--gray-600);
}

.row-button {
  color: var(--white);
  background: var(--amber-600);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 190px auto;
  gap: 12px;
  width: min(920px, 100%);
  margin-top: 28px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
}

.search-panel input,
.search-panel select,
.search-panel button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
}

.search-panel input,
.search-panel select {
  padding: 0 18px;
  background: var(--white);
  color: var(--gray-800);
  outline: none;
}

.search-panel button {
  padding: 0 24px;
  color: var(--white);
  background: var(--amber-700);
  font-weight: 800;
}

.hot-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hot-searches button {
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.search-status {
  margin-bottom: 18px;
  color: var(--amber-700);
  font-size: 20px;
  font-weight: 850;
}

.detail-page {
  padding: 28px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 700;
}

.detail-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
}

.movie-player {
  position: relative;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: #000000;
}

.player-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-circle {
  position: absolute;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--amber-700);
  background: rgba(255, 255, 255, 0.95);
  font-size: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.movie-player.is-playing .player-overlay {
  display: none;
}

.detail-content {
  padding: clamp(22px, 4vw, 42px);
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
}

.one-line {
  margin: 22px 0;
  padding: 18px 20px;
  color: var(--gray-800);
  background: var(--amber-50);
  border-left: 5px solid var(--amber-600);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: var(--gray-600);
  font-size: 17px;
}

.site-footer {
  margin-top: 42px;
  padding: 46px 0 22px;
  background: linear-gradient(180deg, var(--amber-50), var(--amber-100));
  border-top: 1px solid var(--amber-200);
}

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

.footer-logo {
  margin-bottom: 12px;
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: var(--gray-600);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--gray-600);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--amber-700);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  color: var(--gray-500);
  border-top: 1px solid var(--amber-200);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .small-grid,
  .library-grid,
  .category-movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    height: 560px;
  }

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

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

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

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-line {
    font-size: 13px;
  }

  .page-hero {
    padding: 54px 0;
  }

  .search-panel {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .ranking-row {
    grid-template-columns: 44px 78px 1fr;
    align-items: start;
  }

  .ranking-number {
    width: 38px;
    height: 38px;
  }

  .ranking-poster img {
    width: 78px;
  }

  .row-button {
    grid-column: 2 / -1;
    width: max-content;
  }

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

@media (max-width: 460px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .small-grid,
  .library-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
