:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --dark: #1e293b;
  --dark-2: #0f172a;
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --soft: #fff7ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(30, 41, 59, 0.96);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

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

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 26px;
  font-size: 15px;
}

.desktop-nav a {
  color: #f8fafc;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: #fbbf24;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.9);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button {
  border: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.page-main {
  min-height: 60vh;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.32), transparent 34%),
    linear-gradient(135deg, #1e293b 0%, #334155 48%, #78350f 100%);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% 50%;
  height: 300px;
  background: rgba(251, 191, 36, 0.14);
  filter: blur(70px);
  transform: rotate(-12deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 44px;
  align-items: center;
  padding: 70px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fde68a;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

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

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-soft {
  color: #92400e;
  background: #ffedd5;
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px);
}

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

.hero-meta a,
.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  color: #fffbeb;
  font-size: 13px;
}

.hero-feature {
  position: relative;
  display: block;
  min-height: 420px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
}

.hero-feature img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-feature:hover img {
  transform: scale(1.05);
}

.hero-feature-info {
  position: absolute;
  inset: auto 0 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.94));
}

.hero-feature-info strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.hero-feature-info span {
  color: #fde68a;
  font-weight: 700;
}

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

.section-wide {
  padding: 54px 0;
  background: #f1f5f9;
}

.section-wide > .section {
  padding: 0;
}

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

.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head p,
.category-hero p,
.page-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.view-more {
  color: #d97706;
  font-weight: 800;
  white-space: nowrap;
}

.feature-band {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.78);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  font-weight: 900;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 10px;
}

.movie-meta-line span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.chip-list a,
.chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.dark-section {
  background: linear-gradient(135deg, #334155, #0f172a);
  color: #ffffff;
}

.dark-section .section-head p,
.dark-section .movie-card p {
  color: #cbd5e1;
}

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.dark-section .movie-card h3,
.dark-section .movie-card a {
  color: #ffffff;
}

.category-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #78350f);
  padding: 58px 0;
}

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

.category-hero h1 {
  max-width: 820px;
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.category-hero p {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 17px;
}

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

.category-link-card {
  min-height: 92px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

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

.category-link-card span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.filter-panel {
  margin: 24px 0;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 12px;
}

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

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

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 20px;
}

.search-page-form button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 24px;
  font-weight: 900;
  cursor: pointer;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.22);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
  z-index: 3;
}

.player-overlay.is-hidden {
  display: none;
}

.play-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: rgba(245, 158, 11, 0.9);
  color: #ffffff;
  font-size: 34px;
  padding-left: 5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  transition: transform 0.2s ease;
}

.player-overlay:hover .play-button {
  transform: scale(1.06);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.92);
}

.detail-title-block {
  margin: 24px 0;
}

.detail-title-block h1 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-title-block p {
  color: #475569;
  line-height: 1.85;
  font-size: 17px;
}

.detail-card,
.side-card {
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

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

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
  margin-bottom: 20px;
}

.poster-side {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #111827;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.meta-list {
  display: grid;
  gap: 12px;
  color: #475569;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.meta-list strong {
  color: #0f172a;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #fffbeb;
  transform: translateX(3px);
}

.mini-card img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mini-card-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card-text small {
  color: #64748b;
  line-height: 1.4;
}

.mini-rank {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.rank-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.rank-panel h2 {
  margin: 0 0 18px;
}

.empty-tip {
  padding: 28px;
  border-radius: 20px;
  background: #ffffff;
  color: #64748b;
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 60px;
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .hero-feature,
  .hero-feature img {
    min-height: 340px;
  }

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

@media (max-width: 640px) {
  .nav-wrap {
    min-height: 64px;
  }

  .brand-text small {
    display: none;
  }

  .hero-inner {
    padding: 42px 0;
    gap: 28px;
  }

  .hero-feature,
  .hero-feature img {
    min-height: 280px;
  }

  .section,
  .section-wide {
    padding: 36px 0;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .movie-grid.four,
  .movie-grid.two,
  .category-cloud,
  .filter-panel,
  .search-page-form {
    grid-template-columns: 1fr;
  }

  .search-page-form {
    display: grid;
  }

  .search-page-form button {
    min-height: 44px;
  }

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

  .play-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
