:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #f97316;
  --primary-dark: #c2410c;
  --accent: #f59e0b;
  --dark: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(154, 52, 18, 0.08);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--dark);
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
  transition: transform 0.2s ease;
}

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

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.header-search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: var(--white);
}

.header-search input {
  padding: 11px 14px;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  padding: 11px 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
}

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

.nav-link {
  color: #4b5563;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 12px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-weight: 700;
}

.mobile-search {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
}

.mobile-search input {
  padding: 12px;
}

main {
  min-height: 65vh;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--dark);
}

.hero h1 {
  position: absolute;
  left: -9999px;
}

.hero-track,
.hero-slide,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-shade {
  background:
    radial-gradient(circle at 72% 38%, rgba(245, 158, 11, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.66) 48%, rgba(0, 0, 0, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  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);
  padding-right: 42%;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.35);
}

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

.btn-plain {
  color: var(--white);
  background: rgba(17, 24, 39, 0.55);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  user-select: none;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 26px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 42px;
  background: var(--primary);
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 4;
  width: min(660px, calc(100% - 32px));
  display: none;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 16px 18px;
  background: transparent;
}

.hero-search button {
  border: 0;
  padding: 0 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
  font-weight: 900;
}

.content-section,
.page-main > .filter-panel,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 58px 0 0;
}

.quick-section {
  margin-top: 8px;
}

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

.section-heading h2,
.category-overview-card h2,
.player-section h2,
.related-panel h2,
.detail-article h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-intro,
.category-overview-card > p {
  margin: -12px 0 22px;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.detail-article,
.related-panel,
.player-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.category-tile {
  display: block;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 52px rgba(120, 53, 15, 0.2);
}

.category-thumbs {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 6px;
  height: 120px;
  margin-bottom: 14px;
}

.category-thumbs img {
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
  color: var(--dark);
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.compact-grid,
.mini-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fde68a;
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-type,
.card-year {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.card-type {
  left: 12px;
}

.card-year {
  right: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 18px;
  line-height: 1.35;
}

.card-meta {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 270px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rank-grid-wide {
  grid-template-columns: repeat(2, 1fr);
}

.rank-card {
  display: grid;
  grid-template-columns: 46px 116px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.1);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #fde68a;
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
  color: var(--dark);
}

.rank-card p,
.rank-card span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 75% 35%, rgba(245, 158, 11, 0.36), transparent 26%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.56));
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.small-hero {
  min-height: 300px;
}

.compact-actions {
  margin-top: 22px;
}

.category-overview-card {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 24px;
}

.slim-heading {
  margin-bottom: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 20px;
  margin-top: 28px;
}

.filter-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.filter-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.empty-state {
  margin-top: 18px;
  padding: 26px;
  border-radius: 16px;
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

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

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

.detail-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 420px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
  margin: 24px auto;
  padding: 34px;
  overflow: hidden;
  border-radius: 28px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
}

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

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.35);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 30%),
    rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 32px;
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.35);
}

.play-cover strong {
  font-size: 20px;
}

.video-player.is-playing .play-cover {
  display: none;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  margin: 0 auto;
}

.detail-article,
.related-panel {
  padding: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  margin: 14px 0 0;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: #fff7ed;
}

.info-list dt {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.info-list dd {
  margin: 6px 0 0;
  color: var(--dark);
  font-weight: 800;
}

.related-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.related-list .movie-card {
  display: grid;
  grid-template-columns: 128px 1fr;
}

.related-list .card-cover {
  height: 100%;
  aspect-ratio: auto;
}

.related-list .tag-list {
  display: none;
}

.search-box-section {
  padding-top: 34px;
}

.big-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.big-search input {
  min-height: 58px;
  padding: 0 18px;
  font-size: 18px;
}

.big-search button {
  padding: 0 26px;
  font-weight: 900;
}

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

.search-result-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.1);
}

.search-result-card img {
  height: 150px;
  object-fit: cover;
}

.search-result-card div {
  padding: 14px;
}

.search-result-card h3 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 17px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(90deg, #1f2937, #111827);
}

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

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--white);
}

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

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

.footer-inner li + li {
  margin-top: 8px;
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero {
    height: 620px;
  }

  .hero-content {
    padding-right: 0;
    justify-content: flex-start;
    padding-top: 82px;
  }

  .hero-search {
    display: flex;
  }

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

  .rank-grid,
  .rank-grid-wide,
  .detail-layout,
  .filter-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .related-list .movie-card {
    grid-template-columns: 140px 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero {
    height: 650px;
  }

  .hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .hero-actions,
  .compact-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .rank-grid,
  .search-results,
  .filter-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .category-thumbs {
    height: 96px;
  }

  .rank-card {
    grid-template-columns: 42px 92px 1fr;
  }

  .detail-hero {
    padding: 22px;
  }

  .player-section,
  .detail-article,
  .related-panel,
  .category-overview-card {
    padding: 18px;
  }

  .related-list .movie-card {
    grid-template-columns: 1fr;
  }

  .big-search {
    display: grid;
  }

  .big-search button {
    min-height: 48px;
  }
}
