:root {
  --bg: #fff7ed;
  --paper: rgba(255, 255, 255, 0.9);
  --paper-solid: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: rgba(217, 119, 6, 0.18);
  --amber: #d97706;
  --amber-strong: #b45309;
  --orange: #ea580c;
  --dark: #2c1606;
  --deep: #120a04;
  --shadow: 0 24px 80px rgba(146, 64, 14, 0.22);
  --soft-shadow: 0 16px 40px rgba(146, 64, 14, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 34rem),
    linear-gradient(180deg, #fffaf0 0%, #fff7ed 44%, #fffbeb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1440px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.32);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--amber-strong), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.desktop-nav a,
.mobile-panel a {
  color: #57534e;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.desktop-nav a:hover,
.mobile-panel a:hover,
.nav-link.is-active {
  color: var(--amber-strong);
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(217, 119, 6, 0.24);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
}

.header-search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: transparent;
  outline: none;
  color: var(--ink);
}

.header-search button,
.hero-actions a,
.section-more,
.filter-clear,
.player-button,
.detail-action,
.empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button {
  height: 36px;
  padding: 0 16px;
}

.header-search button:hover,
.hero-actions a:hover,
.section-more:hover,
.filter-clear:hover,
.player-button:hover,
.detail-action:hover,
.empty-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.35);
}

.mobile-toggle {
  display: none;
  color: var(--amber-strong);
  font-size: 28px;
  line-height: 1;
}

.mobile-panel {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 660px;
  color: #fff;
  background: var(--deep);
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  opacity: 0.58;
  filter: saturate(1.12) contrast(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 10, 4, 0.96) 0%, rgba(44, 22, 6, 0.78) 40%, rgba(18, 10, 4, 0.36) 100%),
    radial-gradient(circle at 15% 12%, rgba(245, 158, 11, 0.35), transparent 34rem),
    linear-gradient(180deg, rgba(18, 10, 4, 0.10) 0%, rgba(18, 10, 4, 0.84) 100%);
}

.hero-content {
  position: relative;
  width: min(1440px, 100%);
  padding: 82px 24px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.62fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 13px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.15);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.hero-copy h1 span {
  color: #fbbf24;
}

.hero-copy p {
  max-width: 720px;
  margin-top: 22px;
  color: #fed7aa;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #78350f;
  background: rgba(254, 243, 199, 0.88);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-actions a {
  min-height: 48px;
  padding: 0 22px;
}

.hero-actions a.secondary {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(254, 243, 199, 0.28);
  box-shadow: none;
}

.hero-card {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  height: 430px;
  border-radius: 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.hero-card-info {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 34px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 10, 4, 0.16), rgba(18, 10, 4, 0.82));
}

.hero-card-info strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.hero-card-info em {
  display: block;
  margin-top: 6px;
  color: #fde68a;
  font-style: normal;
  font-size: 14px;
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  width: min(960px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  background: rgba(217, 119, 6, 0.46);
  transform: translateY(-3px);
}

.hero-thumb img {
  width: 52px;
  height: 64px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hero-thumb span {
  display: block;
  overflow: hidden;
  color: #fffbeb;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-thumb em {
  display: block;
  color: #fed7aa;
  font-size: 12px;
  font-style: normal;
}

.page-section,
.catalog-section,
.detail-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 70px 24px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  color: var(--dark);
  font-weight: 950;
  letter-spacing: -0.055em;
}

.section-heading h2 {
  font-size: clamp(30px, 4.5vw, 52px);
}

.section-heading p,
.page-title p,
.detail-title p,
.category-intro,
.detail-text p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading p {
  max-width: 720px;
  margin-top: 8px;
}

.section-kicker,
.detail-kicker {
  color: var(--amber-strong);
  background: rgba(254, 243, 199, 0.88);
  border-color: rgba(217, 119, 6, 0.18);
}

.section-more,
.empty-link {
  min-height: 42px;
  padding: 0 18px;
  flex: 0 0 auto;
}

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

.category-card {
  position: relative;
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(254, 243, 199, 0.64));
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -64px;
  bottom: -78px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.32), transparent 68%);
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--dark);
  font-size: 23px;
  font-weight: 950;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.movie-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(217, 119, 6, 0.34);
  box-shadow: var(--shadow);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.poster-shell img {
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(18, 10, 4, 0.86) 100%);
}

.poster-year,
.poster-score {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
  background: rgba(18, 10, 4, 0.54);
}

.poster-score {
  right: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-info p {
  min-height: 48px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: 12px;
}

.movie-meta span {
  min-height: 24px;
  color: #92400e;
  font-size: 12px;
  background: rgba(254, 243, 199, 0.86);
}

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

.tag-row a,
.tag-row span,
.detail-tags a,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.filter-panel,
.detail-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.rank-panel h2,
.filter-panel h2,
.detail-card h2 {
  color: var(--dark);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(254, 243, 199, 0.44);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(253, 230, 138, 0.55);
}

.rank-no {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 13px;
  font-weight: 950;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  background: #fef3c7;
}

.rank-text {
  min-width: 0;
}

.rank-text strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text em {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--amber-strong);
  font-weight: 950;
}

.page-hero {
  position: relative;
  padding: 82px 24px 66px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.38), transparent 32rem),
    linear-gradient(135deg, #2c1606 0%, #78350f 48%, #ea580c 100%);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -70% auto;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.13);
}

.page-title {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
}

.page-title h1 {
  color: #fff;
  font-size: clamp(38px, 6vw, 70px);
}

.page-title p {
  max-width: 760px;
  margin-top: 18px;
  color: #fed7aa;
  font-size: 18px;
}

.filter-panel {
  padding: 22px;
  margin-bottom: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.5fr)) auto;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.20);
}

.filter-clear {
  min-height: 46px;
  padding: 0 18px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px dashed rgba(217, 119, 6, 0.32);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.68);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 590px;
  color: #fff;
  background: var(--deep);
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  opacity: 0.52;
  filter: saturate(1.1) contrast(1.03);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 10, 4, 0.96), rgba(44, 22, 6, 0.70) 52%, rgba(18, 10, 4, 0.26)),
    linear-gradient(180deg, transparent 0%, rgba(18, 10, 4, 0.92) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 24px 84px;
  display: grid;
  grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-poster {
  border-radius: 34px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  border-radius: 25px;
  background: linear-gradient(135deg, #78350f, #f59e0b);
}

.detail-title h1 {
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
}

.detail-title p {
  max-width: 860px;
  margin-top: 18px;
  color: #fed7aa;
  font-size: 18px;
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.detail-action {
  min-height: 48px;
  padding: 0 22px;
}

.detail-action.secondary {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(254, 243, 199, 0.28);
  box-shadow: none;
}

.player-card {
  padding: 18px;
  margin-bottom: 30px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  font-size: 34px;
  text-indent: 4px;
}

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

.detail-card {
  padding: 28px;
  margin-bottom: 28px;
}

.detail-text h2 {
  margin-bottom: 14px;
}

.detail-text p + p {
  margin-top: 14px;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumbs a:hover {
  color: #fff;
}

.site-footer {
  margin-top: 60px;
  color: #fffbeb;
  background: linear-gradient(180deg, #78350f 0%, #2c1606 100%);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px 24px 34px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 36px;
}

.footer-brand {
  color: #fde68a;
  font-size: 26px;
}

.site-footer p {
  max-width: 430px;
  margin-top: 12px;
  color: #fed7aa;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: #fef3c7;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.26);
}

.footer-bottom {
  border-top: 1px solid rgba(254, 243, 199, 0.16);
  padding: 18px 24px;
  color: #fed7aa;
  text-align: center;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(146, 64, 14, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

  .mobile-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

  .hero-content,
  .detail-hero-inner,
  .detail-grid,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

  .side-card,
  .rank-panel {
    position: static;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 12px;
  }

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

  .header-search {
    order: 3;
    width: 100%;
  }

  .mobile-panel.is-open {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 54px 18px 180px;
  }

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

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .page-section,
  .catalog-section,
  .detail-section {
    padding: 46px 16px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

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

  .movie-info {
    padding: 14px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

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

  .detail-hero-inner {
    padding: 42px 16px 58px;
  }

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

  .player-button {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 42px 16px 28px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-score {
    display: none;
  }
}
