:root {
  --amber: #d97706;
  --orange: #f97316;
  --dark: #111827;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 52%, #eef2f7 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.28);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 650;
}

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

.desktop-nav a:hover {
  color: #fffbeb;
  transform: translateY(-1px);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

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

.hero {
  position: relative;
  width: min(1320px, calc(100% - 32px));
  min-height: 560px;
  margin: 24px auto 32px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.65s ease;
}

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

.hero-content {
  width: min(650px, calc(100% - 48px));
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  color: #ffffff;
}

.eyebrow,
.section-heading span,
.page-hero span,
.detail-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.22);
  box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.28);
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.search-form button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button,
.filter-panel button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.search-form button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.48);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(217, 119, 6, 0.82);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

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

.panel {
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: center;
  gap: 24px;
  padding: 26px;
}

.quick-search h2,
.rank-panel h2,
.table-panel h2 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 24px;
  font-weight: 900;
}

.quick-search p,
.page-hero p,
.category-chip em,
.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

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

.section {
  margin-top: 44px;
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  font-weight: 900;
}

.section-heading a {
  color: var(--amber);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card.small .movie-poster {
  aspect-ratio: 4 / 5;
}

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card:hover .poster-play {
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 10px 18px rgba(239, 68, 68, 0.28);
}

.movie-info {
  padding: 14px;
}

.movie-info h2 {
  margin: 0;
  color: var(--dark);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-info h2 a:hover {
  color: var(--amber);
}

.movie-info p {
  min-height: 44px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 7px;
  color: #d1d5db;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  color: #92400e;
  background: #fef3c7;
}

.category-section {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.category-chip {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  box-shadow: inset 0 0 0 1px #fed7aa;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px #fb923c, 0 16px 30px rgba(217, 119, 6, 0.14);
}

.category-chip span {
  color: #9a3412;
  font-size: 20px;
  font-weight: 900;
}

.category-chip em {
  font-size: 13px;
  font-style: normal;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.spotlight-panel,
.rank-panel,
.table-panel,
.filter-panel,
.detail-copy,
.player-panel,
.detail-card,
.page-hero {
  padding: 26px;
}

.rank-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--amber);
}

.rank-row span {
  color: var(--dark);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

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

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

.footer-grid p,
.footer-grid li {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: #f59e0b;
}

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

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 16px 28px rgba(217, 119, 6, 0.28);
  z-index: 45;
}

.back-to-top.is-visible {
  display: grid;
  place-items: center;
}

.page-main {
  padding-top: 24px;
}

.page-hero {
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.page-hero h1 {
  margin: 0 0 12px;
  color: var(--dark);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
}

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

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

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.82));
}

.category-card div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
}

.category-card p {
  color: rgba(255, 255, 255, 0.85);
}

.category-list,
.search-list {
  margin-top: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(130px, 0.55fr)) auto;
  gap: 12px;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ranking-table th {
  color: #6b7280;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.ranking-table td:first-child {
  color: var(--amber);
  font-weight: 900;
}

.ranking-table a {
  color: var(--dark);
  font-weight: 850;
}

.ranking-table a:hover {
  color: var(--amber);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.player-cover .big-play {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.36);
  font-size: 30px;
}

.player-cover strong {
  max-width: 80%;
  text-align: center;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 900;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.detail-meta-list span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 12px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 800;
}

.detail-copy {
  margin-top: 24px;
}

.detail-copy h1 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
  line-height: 1.08;
}

.detail-copy .lead {
  margin: 16px 0 0;
  color: #4b5563;
  font-size: 19px;
  line-height: 1.8;
}

.detail-copy h2 {
  margin: 30px 0 12px;
  color: var(--dark);
  font-size: 24px;
  font-weight: 900;
}

.detail-copy p {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.9;
}

.genre-tags span {
  color: #1d4ed8;
  background: #dbeafe;
}

.hidden-card {
  display: none !important;
}

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

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

  .split-section,
  .detail-layout,
  .quick-search {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: flex;
  }

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

  .brand-name {
    font-size: 21px;
  }

  .hero {
    min-height: 620px;
    border-radius: 22px;
  }

  .hero-content {
    min-height: 620px;
    width: 100%;
    padding: 34px 24px 84px;
  }

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

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

  .hero-prev {
    left: auto;
    right: 78px;
  }

  .hero-next {
    right: 24px;
  }

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

  .search-form {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.six,
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

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

  .spotlight-panel,
  .rank-panel,
  .table-panel,
  .filter-panel,
  .detail-copy,
  .player-panel,
  .detail-card,
  .page-hero,
  .quick-search,
  .category-section {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  main,
  .page-main,
  .site-header-inner,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    width: min(100% - 22px, 1320px);
    margin-top: 16px;
  }

  .movie-grid,
  .movie-grid.six,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

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

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