* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f2937;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 48%, #f9fafb 100%);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #78350f 0%, #92400e 50%, #78350f 100%);
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
  font-size: 26px;
  font-weight: 900;
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: #fde68a;
  font-size: 12px;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #ffffff;
  border-radius: 12px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 16px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fef3c7;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  gap: 8px;
  padding: 0 16px 16px;
}

.mobile-nav a {
  display: flex;
  padding: 12px 14px;
}

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

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #78350f;
}

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

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    90deg,
    rgba(69, 26, 3, 0.92),
    rgba(146, 64, 14, 0.78),
    rgba(69, 26, 3, 0.32)
  );
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  transform: scale(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 78px 0 130px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h1 span {
  color: #fcd34d;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #fef3c7;
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7ed;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #ffffff;
  color: #78350f;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  background: #fef3c7;
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(180, 83, 9, 0.26);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.68);
  color: #ffffff;
  background: transparent;
}

.btn-outline:hover {
  color: #78350f;
  background: #ffffff;
}

.hero-thumbs {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 34px;
  left: max(16px, calc((100% - 1180px) / 2));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  cursor: pointer;
  text-align: left;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.hero-thumb img {
  width: 56px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  display: block;
  overflow: hidden;
  color: #fef3c7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  background: rgba(245, 158, 11, 0.36);
  transform: translateY(-2px);
}

.section {
  padding: 72px 0;
}

.section-soft {
  padding: 72px 0;
  background: linear-gradient(90deg, #fef3c7, #fff7ed);
}

.section-gray {
  padding: 72px 0;
  background: #f9fafb;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-title p {
  margin: 10px 0 0;
  color: #6b7280;
}

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

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

.movie-card,
.category-card,
.stat-card,
.related-card {
  overflow: hidden;
  border: 1px solid rgba(180, 83, 9, 0.1);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(31, 41, 55, 0.08);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.related-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 54px rgba(120, 53, 15, 0.16);
  transform: translateY(-5px);
}

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

.poster-link img,
.related-card img,
.category-card img,
.mini-card img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.related-card:hover img,
.category-card:hover img,
.mini-card:hover img {
  transform: scale(1.07);
}

.score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover,
.rank-info a:hover,
.footer-grid a:hover {
  color: #d97706;
}

.movie-meta,
.movie-desc,
.rank-info p,
.footer-grid p,
.detail-copy p,
.player-note {
  color: #6b7280;
}

.movie-meta {
  margin: 8px 0;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 50px;
  margin: 0 0 14px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

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

.mini-card {
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(120, 53, 15, 0.13);
}

.mini-card a:first-child {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
}

.mini-card a span {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.mini-card h3 {
  margin: 12px 0 4px;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
}

.mini-card p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(69, 26, 3, 0.94), rgba(146, 64, 14, 0.88)),
    url("./1.jpg") center / cover;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  color: #fef3c7;
  font-size: 18px;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(120, 53, 15, 0.92),
    rgba(245, 158, 11, 0.78)
  );
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  mix-blend-mode: overlay;
}

.category-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 172px;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
  color: #fef3c7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid rgba(180, 83, 9, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.06);
}

.filter-panel input,
.filter-panel select,
.search-box input,
.search-box select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #f3d18b;
  border-radius: 14px;
  outline: none;
  background: #fffbeb;
  color: #1f2937;
}

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

.no-result {
  display: none;
  padding: 36px;
  border-radius: 22px;
  background: #ffffff;
  color: #92400e;
  text-align: center;
}

.no-result.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 74px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(180, 83, 9, 0.1);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.06);
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  color: #ffffff;
  font-weight: 900;
}

.rank-cover {
  display: block;
  width: 74px;
  height: 98px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 20px;
}

.rank-info p {
  margin: 4px 0;
}

.rank-play {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.rank-play:hover {
  background: #f59e0b;
  color: #ffffff;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px 140px;
  gap: 14px;
  padding: 20px;
  margin: 28px 0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(31, 41, 55, 0.08);
}

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

.search-result-card {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.search-result-card h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 19px;
}

.search-result-card p {
  margin: 6px 0;
  color: #6b7280;
}

.detail-hero {
  padding: 56px 0;
  background: linear-gradient(90deg, #fffbeb, #ffffff);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: #92400e;
  font-weight: 700;
}

.breadcrumb span {
  color: #9ca3af;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(120, 53, 15, 0.2);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
}

.detail-title h1 {
  margin-top: 14px;
  font-size: clamp(32px, 5vw, 58px);
}

.detail-title p {
  max-width: 760px;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

.player-section {
  padding: 42px 0 76px;
  background: #111827;
}

.player-wrap {
  border-radius: 28px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.36);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.player-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    135deg,
    rgba(17, 24, 39, 0.62),
    rgba(120, 53, 15, 0.54)
  );
}

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

.play-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #92400e;
  cursor: pointer;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.play-button:hover {
  background: #fef3c7;
  transform: scale(1.08);
}

.play-button svg {
  margin-left: 6px;
}

.player-title {
  padding: 18px 22px;
  color: #ffffff;
  background: linear-gradient(90deg, #78350f, #92400e);
}

.player-title h2 {
  margin: 0;
  font-size: 24px;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 66px 0;
}

.detail-copy section,
.related-section {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.06);
}

.detail-copy h2,
.related-section h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
}

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

.related-card a:first-child {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.related-card h3 {
  margin: 12px 12px 4px;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
}

.related-card p {
  margin: 0 12px 14px;
  color: #6b7280;
  font-size: 12px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 52px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 19px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 1024px) {
  .movie-grid,
  .category-grid,
  .search-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .brand-text strong {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 56px 0 245px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .search-results,
  .mini-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel,
  .search-box {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 64px 1fr;
  }

  .rank-play {
    grid-column: 1 / -1;
    text-align: center;
  }

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

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

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

  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .search-results,
  .mini-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .section {
    padding: 52px 0;
  }

  .rank-row {
    grid-template-columns: 46px 1fr;
  }

  .rank-cover {
    display: none;
  }
}
