:root {
  --bg: #0a0e1a;
  --bg-deep: #060913;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(245, 158, 11, 0.24);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --amber: #f59e0b;
  --orange: #f97316;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.glass {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

.brand-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.35);
}

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

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

.nav-link,
.dropdown-toggle {
  border: 0;
  background: transparent;
  color: var(--soft);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: var(--amber);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(10, 14, 26, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link,
.mobile-link {
  border-radius: 10px;
  color: var(--soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-link {
  padding: 9px 12px;
}

.dropdown-link:hover,
.dropdown-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 26px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 1s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 9, 19, 0.1), rgba(10, 14, 26, 0.86)),
    linear-gradient(90deg, rgba(10, 14, 26, 0.86), rgba(10, 14, 26, 0.22));
}

.hero-content {
  position: relative;
  display: flex;
  height: 100%;
  align-items: flex-end;
  padding-bottom: 78px;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.hero p {
  margin: 0 0 20px;
  max-width: 680px;
  color: var(--soft);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.primary-button {
  color: #111827;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.section-block {
  padding: 70px 0 0;
}

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

.section-heading h2,
.article-section h2,
.player-section h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

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

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

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

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

.horizontal-grid,
.list-grid,
.rank-list {
  display: grid;
  gap: 16px;
}

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

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

.movie-card,
.category-tile,
.rank-item {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.rank-item:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--panel-strong);
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  height: 260px;
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.movie-poster,
.movie-thumb,
.category-tile img,
.rank-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster,
.movie-card:hover .movie-thumb,
.category-tile:hover img,
.rank-item:hover img {
  transform: scale(1.04);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--text);
  font-size: 12px;
}

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

.movie-card h3,
.rank-copy h3,
.category-tile h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.rank-item:hover h3,
.category-tile:hover h3 {
  color: var(--amber);
}

.movie-card p,
.rank-copy p,
.category-tile p,
.page-hero p,
.detail-one-line,
.article-section p,
.footer-brand p {
  color: var(--muted);
}

.movie-card p,
.rank-copy p,
.category-tile p {
  display: -webkit-box;
  margin: 10px 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-link,
.list-link,
.rank-item a {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 14px;
}

.movie-thumb.wide {
  width: 168px;
  height: 110px;
  border-radius: 14px;
  flex: 0 0 168px;
}

.list-thumb {
  width: 210px;
  height: 136px;
  border-radius: 14px;
  flex: 0 0 210px;
}

.category-tile {
  position: relative;
  display: block;
  min-height: 220px;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.52;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.22), rgba(10, 14, 26, 0.92));
}

.category-tile div {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: var(--radius);
}

.filter-actions {
  display: flex;
  gap: 12px;
}

.filter-input,
.filter-select {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  background: rgba(6, 9, 19, 0.64);
  color: var(--text);
}

.filter-input {
  width: 100%;
  padding: 0 16px;
}

.filter-select {
  padding: 0 14px;
}

.empty-message {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.empty-message.show {
  display: block;
}

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

.rank-item a {
  align-items: center;
}

.rank-number {
  width: 48px;
  flex: 0 0 48px;
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 94px;
  height: 120px;
  border-radius: 12px;
  flex: 0 0 94px;
}

.full-rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-hero {
  position: relative;
  padding: 88px 0 52px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg-deep);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-inner {
  position: relative;
  padding: 32px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--soft);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 260px;
  height: 360px;
  border-radius: 22px;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 28px;
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.article-section {
  max-width: 920px;
}

.article-section h2 {
  margin: 30px 0 12px;
  color: var(--amber);
}

.article-section p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(6, 9, 19, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 46px 0;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--amber);
  font-size: 18px;
}

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

.site-footer li,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
}

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

.site-footer a:hover {
  color: var(--amber);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .mobile-nav.open {
    display: grid;
    gap: 6px;
  }

  .mobile-link {
    padding: 10px 12px;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .featured-grid,
  .horizontal-grid,
  .rank-grid,
  .full-rank-list,
  .footer-grid,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .detail-layout {
    align-items: start;
  }

  .detail-poster {
    width: 190px;
    height: 270px;
  }
}

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

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

  .hero {
    height: 520px;
  }

  .hero-content {
    padding-bottom: 68px;
  }

  .hero p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

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

  .poster-wrap {
    height: 220px;
  }

  .horizontal-link,
  .list-link,
  .rank-item a {
    gap: 12px;
    padding: 12px;
  }

  .movie-thumb.wide,
  .list-thumb {
    width: 110px;
    height: 86px;
    flex-basis: 110px;
  }

  .rank-number {
    width: 34px;
    flex-basis: 34px;
    font-size: 20px;
  }

  .rank-item img {
    width: 72px;
    height: 94px;
    flex-basis: 72px;
  }

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

  .movie-card h3,
  .rank-copy h3,
  .category-tile h3 {
    font-size: 16px;
  }

  .detail-hero {
    min-height: 520px;
  }

  .detail-poster {
    display: none;
  }
}

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

  .poster-wrap {
    height: 280px;
  }
}
