:root {
  --color-bg: #fffaf2;
  --color-surface: #ffffff;
  --color-soft: #fff7ed;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #fde7c7;
  --color-amber: #f59e0b;
  --color-orange: #f97316;
  --color-red: #ef4444;
  --color-pink: #ec4899;
  --shadow-soft: 0 20px 60px rgba(146, 64, 14, 0.12);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 8%, rgba(236, 72, 153, 0.12), transparent 32rem),
    var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - var(--container)) / 2));
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(253, 231, 199, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.brand-name {
  font-size: 1.28rem;
}

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

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #b45309;
  background: #ffedd5;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 30vw);
}

.header-search input {
  width: 100%;
  border: 2px solid #fed7aa;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: var(--color-amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.header-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.2);
}

.secondary-button {
  color: #92400e;
  background: rgba(255, 237, 213, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #92400e;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  position: sticky;
  top: 76px;
  z-index: 45;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(16px);
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
}

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

.page-main,
.home-main {
  width: min(var(--container), calc(100vw - 32px));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  min-height: 540px;
  margin: 28px auto 42px;
  overflow: hidden;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow-soft);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  padding: 58px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.76) 42%, rgba(17, 24, 39, 0.18) 100%),
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.32), transparent 24rem);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-site-title {
  display: block;
  margin-bottom: 14px;
  color: #ffffff;
}

.hero-movie-title {
  display: block;
  color: #fcd34d;
}

.hero-content p {
  max-width: 660px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.07rem;
}

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

.hero-poster {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1f2937;
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 32px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #f59e0b;
}

.quick-categories,
.content-section,
.category-card-grid,
.detail-layout,
.ranking-list,
.filter-panel,
.player-section,
.detail-info,
.related-section {
  margin-bottom: 42px;
}

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

.quick-category {
  min-height: 130px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-category:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(146, 64, 14, 0.15);
}

.quick-category span,
.section-heading span,
.page-kicker {
  display: inline-flex;
  color: #d97706;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-category strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 1.24rem;
}

.quick-category p {
  margin: 0;
  color: var(--color-muted);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
  margin: 0;
  max-width: 760px;
  color: var(--color-muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid rgba(253, 231, 199, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-card:hover .poster-link img,
.rank-item:hover img {
  transform: scale(1.07);
}

.type-badge,
.rank-badge,
.detail-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.74);
  backdrop-filter: blur(8px);
}

.type-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.1em;
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: #d97706;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
  color: #9a3412;
  font-size: 0.84rem;
  font-weight: 750;
}

.movie-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.8em;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 0.75rem;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr repeat(3, minmax(140px, 0.6fr));
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.filter-panel strong {
  font-size: 1.05rem;
}

.filter-panel p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 2px solid #fed7aa;
  border-radius: 15px;
  padding: 11px 12px;
  outline: none;
  background: #ffffff;
  color: #111827;
}

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

.empty-state {
  margin: -24px 0 34px;
  padding: 20px;
  border-radius: var(--radius-md);
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-weight: 800;
}

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

.category-card {
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

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

.category-card .category-arrow {
  display: inline-flex;
  margin-top: 18px;
  color: #d97706;
  font-weight: 900;
}

.page-hero {
  margin: 30px 0 32px;
  padding: 38px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.16), transparent 28rem);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}

.page-title {
  margin-top: 8px;
}

.page-lead {
  margin-top: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  font-weight: 950;
}

.rank-poster {
  width: 92px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.35;
}

.rank-info p {
  margin: 7px 0 0;
  color: var(--color-muted);
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #92400e;
  font-size: 0.84rem;
  font-weight: 800;
}

.rank-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff7ed;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 18px;
  color: #92400e;
  font-weight: 800;
}

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

.player-section {
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow-soft);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.72));
}

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

.player-button-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  font-size: 1.06rem;
  font-weight: 900;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-amber), var(--color-red));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.32);
}

.detail-info,
.detail-side-card,
.related-section {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.detail-info {
  padding: 28px;
}

.detail-title {
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #92400e;
  background: #fff7ed;
  font-weight: 850;
}

.detail-info h2,
.related-section h2,
.detail-side-card h2 {
  margin: 24px 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.detail-info p {
  margin: 0 0 14px;
  color: #374151;
}

.detail-side-card {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: #111827;
}

.related-section {
  padding: 24px;
}

.site-footer {
  margin-top: 56px;
  padding: 44px max(24px, calc((100vw - var(--container)) / 2));
  color: #78350f;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-top: 1px solid var(--color-line);
}

.footer-brand {
  margin-bottom: 8px;
  font-size: 1.35rem;
  font-weight: 950;
}

.site-footer p {
  max-width: 820px;
  margin: 0 0 18px;
  color: #92400e;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 850;
}

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

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

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

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

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

  .detail-side-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 70px;
    padding: 12px 16px;
  }

  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .mobile-nav {
    top: 70px;
  }

  .hero-slider {
    min-height: 670px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 24px 72px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62));
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
    transform: none;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

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

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

  .rank-item .primary-button {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .page-main,
  .home-main {
    width: min(100vw - 22px, var(--container));
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-slider {
    margin-top: 16px;
    min-height: 650px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.28rem;
  }

  .quick-categories,
  .category-card-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .movie-title {
    font-size: 0.95rem;
  }

  .movie-desc {
    font-size: 0.86rem;
  }

  .page-hero,
  .detail-info,
  .related-section {
    padding: 22px;
    border-radius: 22px;
  }

  .rank-info p {
    display: none;
  }

  .detail-meta span {
    font-size: 0.85rem;
  }
}
