* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: #f8fafc;
  min-height: 100vh;
}

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, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.06em;
}

.brand-text em {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

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

.desktop-nav > a,
.mobile-nav > a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.mobile-nav > a:hover,
.mobile-nav > a.is-active {
  color: #f59e0b;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  background: #334155;
  border: 1px solid #475569;
  border-radius: 12px;
  overflow: hidden;
}

.nav-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 12px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: #f59e0b;
  padding: 10px 14px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: #334155;
  border-radius: 10px;
  padding: 10px 12px;
}

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

.hero {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 38%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 64px;
  max-width: 720px;
}

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

.hero-tags span,
.detail-tags span,
.category-pills a {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  background: #f59e0b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
  color: #e2e8f0;
  font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.small-button {
  color: #ffffff;
  background: #f59e0b;
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.24);
}

.primary-button {
  padding: 14px 28px;
}

.small-button {
  padding: 10px 16px;
  font-size: 14px;
}

.ghost-button {
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.38);
  padding: 13px 24px;
  background: rgba(15, 23, 42, 0.36);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.page-section {
  padding: 56px 0;
}

.page-section.compact {
  padding: 36px 0;
}

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

.section-kicker {
  color: #f59e0b;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head p,
.page-title p,
.detail-title p {
  color: #cbd5e1;
  line-height: 1.8;
}

.page-title {
  padding: 48px 0 24px;
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 50px);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.poster-card,
.category-card,
.panel-card,
.info-card {
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.76);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 46px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.poster-card:hover,
.category-card:hover,
.panel-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.92);
  box-shadow: 0 24px 56px rgba(245, 158, 11, 0.14);
}

.poster-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-cover img,
.category-card img,
.wide-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.poster-card:hover img,
.category-card:hover img,
.wide-card-link:hover img {
  transform: scale(1.08);
}

.year-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #ffffff;
  background: #f59e0b;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-body {
  padding: 14px;
}

.poster-body h3,
.wide-body h3,
.category-card h3,
.info-card h2,
.info-card h3 {
  margin: 0;
}

.poster-body h3 {
  overflow: hidden;
  min-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
}

.poster-body p,
.wide-body p,
.category-card p,
.info-card p {
  color: #94a3b8;
  line-height: 1.7;
}

.poster-body p {
  margin: 10px 0 0;
  font-size: 13px;
}

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

.tag-row span {
  color: #cbd5e1;
  background: #334155;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 12px;
}

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

.wide-card-link {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 116px;
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.wide-card-link:hover {
  transform: translateX(4px);
  border-color: #f59e0b;
}

.wide-cover {
  overflow: hidden;
  background: #0f172a;
}

.wide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.wide-body p {
  margin: 8px 0 12px;
}

.wide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #cbd5e1;
  font-size: 13px;
}

.category-card {
  display: block;
  min-height: 238px;
  position: relative;
}

.category-card .category-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0f172a;
}

.category-card .category-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.48), rgba(2, 6, 23, 0.12));
}

.category-card .category-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
}

.category-card h3 {
  font-size: 24px;
}

.category-card p {
  margin: 8px 0 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid rgba(71, 85, 105, 0.74);
  border-radius: 18px;
}

.toolbar input,
.search-panel input,
.toolbar select {
  border: 1px solid #475569;
  outline: 0;
  color: #ffffff;
  background: #334155;
  border-radius: 12px;
  padding: 12px 14px;
}

.toolbar input {
  width: min(420px, 100%);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.toolbar button,
.search-panel button {
  border: 0;
  color: #ffffff;
  background: #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 20px;
}

.search-panel input {
  width: 100%;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 58px 64px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  border-color: #f59e0b;
}

.rank-no {
  color: #f59e0b;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: #94a3b8;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
  padding: 34px 0 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  border: 1px solid rgba(71, 85, 105, 0.78);
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.44);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.36));
  cursor: pointer;
  z-index: 2;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #f59e0b;
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
  cursor: pointer;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-panel,
.side-panel,
.info-card {
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 20px;
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
  color: #cbd5e1;
}

.detail-tags {
  margin: 20px 0;
}

.detail-tags span {
  background: #334155;
  color: #f59e0b;
}

.detail-text h2,
.detail-text h3 {
  margin: 26px 0 12px;
}

.detail-text p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: #0f172a;
  margin-bottom: 18px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.52);
  transition: background 0.2s ease;
}

.side-item:hover {
  background: rgba(71, 85, 105, 0.78);
}

.side-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.side-item strong {
  display: block;
  margin-bottom: 6px;
}

.side-item span {
  color: #94a3b8;
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  padding-top: 26px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #f59e0b;
}

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

.info-card h2,
.info-card h3 {
  color: #ffffff;
}

.info-card p,
.info-card li {
  color: #cbd5e1;
  line-height: 1.8;
}

.info-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(71, 85, 105, 0.8);
  background: rgba(15, 23, 42, 0.92);
}

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

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
  line-height: 1.8;
}

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

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

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

.site-footer li + li {
  margin-top: 9px;
}

.footer-bottom {
  border-top: 1px solid rgba(71, 85, 105, 0.65);
  padding: 18px 16px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.empty-state {
  display: none;
  color: #94a3b8;
  text-align: center;
  padding: 60px 0;
}

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

@media (max-width: 1100px) {
  .grid.poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

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

  .mobile-search {
    width: 100%;
  }

  .mobile-search input {
    width: 100%;
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 72px;
  }

  .hero-control {
    display: none;
  }

  .section-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .grid.poster-grid,
  .grid.category-grid,
  .grid.feature-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .wide-card-link {
    grid-template-columns: 120px 1fr;
  }

  .rank-row a {
    grid-template-columns: 42px 54px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .mobile-nav,
  .container,
  .footer-grid {
    width: min(100% - 24px, 1280px);
  }

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

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

  .poster-body {
    padding: 11px;
  }

  .poster-body h3 {
    font-size: 14px;
  }

  .category-card {
    min-height: 190px;
  }

  .detail-panel,
  .side-panel,
  .info-card {
    padding: 18px;
  }

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