:root {
  --bg: #060606;
  --bg-soft: #0d0d0f;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f6f6f6;
  --muted: #b7b7b7;
  --gold-1: #ffe17e;
  --gold-2: #ffc93c;
  --gold-3: #b87d00;
  --danger: #ff6d7a;
  --shadow: 0 20px 64px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 193, 60, 0.12), transparent 20%),
    linear-gradient(180deg, #090909 0%, #040404 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  backdrop-filter: blur(18px);
  background: rgba(6, 6, 6, 0.78);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand__logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand__text strong {
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.brand__text span,
.eyebrow,
.section-note,
.site-footer p,
.movie-card__body p,
.player-note,
.page-intro p,
small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a,
.ghost-btn,
.text-link {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.2s ease;
}

.site-nav a.active,
.site-nav a:hover,
.ghost-btn:hover,
.ghost-btn.active,
.text-link:hover {
  border-color: rgba(255, 201, 60, 0.42);
  background: rgba(255, 201, 60, 0.12);
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero,
.page-intro,
.filter-panel,
.continue-banner,
.detail-grid,
.info-panel,
.player-card,
.watch-sidebar__box,
.quick-stats,
.feature-card,
.site-footer {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.hero {
  overflow: hidden;
  border-radius: 34px;
  min-height: 560px;
  background-size: cover;
  background-position: center;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 360px);
  align-items: end;
  gap: 28px;
  min-height: 560px;
  padding: 42px;
}

.hero__text h1,
.page-intro h1,
.detail-hero__body h1,
.player-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
}

.hero__text p,
.detail-hero__body p,
.watch-sidebar__box p {
  line-height: 1.8;
}

.hero__poster img,
.detail-hero__poster,
.watch-sidebar img {
  width: 100%;
  max-width: 340px;
  justify-self: end;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

.hero-badges,
.movie-badges,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.hero-actions,
.movie-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn {
  color: #111;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2), var(--gold-3));
  box-shadow: 0 12px 24px rgba(255, 201, 60, 0.28);
}

.secondary-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

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

.section-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.section-head h2,
.continue-banner h3,
.watch-sidebar__box h2,
.info-panel h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
}

.stat-box {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.stat-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.4rem;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 201, 60, 0.3);
}

.movie-card__poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
}

.movie-card__poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #121212;
}

.movie-card__status,
.movie-card__quality {
  position: absolute;
  top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.movie-card__status {
  left: 12px;
  background: rgba(255, 201, 60, 0.9);
  color: #191919;
}

.movie-card__quality {
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.movie-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.movie-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.movie-card__head h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.movie-card__desc {
  margin: 0;
  line-height: 1.7;
}

.movie-card--compact .movie-card__desc,
.movie-card--compact .movie-card__actions {
  display: none;
}

.favorite-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.favorite-toggle.is-active {
  color: var(--danger);
  border-color: rgba(255, 109, 122, 0.36);
  background: rgba(255, 109, 122, 0.12);
}

.continue-banner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border-radius: 28px;
}

.continue-banner img {
  border-radius: 22px;
}

.progress {
  width: 100%;
  height: 10px;
  margin: 14px 0 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-1));
}

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

.feature-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 280px;
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.75));
}

.page-intro,
.filter-panel,
.detail-grid,
.info-panel {
  padding: 24px;
  border-radius: 28px;
}

.page-intro h1 {
  margin-bottom: 10px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field input,
.field select {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 26px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

.detail-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.detail-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.info-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 22px;
}

.player-card,
.watch-sidebar__box {
  padding: 22px;
  border-radius: 28px;
}

.player-card__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.player-wrap {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: #000;
}

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

.server-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.watch-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.watch-sidebar img {
  width: 100%;
  max-width: none;
}

.meta-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.empty-state {
  padding: 32px;
  border-radius: 28px;
  text-align: center;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.site-footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
}

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

code {
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1180px) {
  .site-header,
  .hero__content,
  .watch-layout,
  .continue-banner,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero__poster img,
  .detail-hero__poster {
    justify-self: start;
  }

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

  .movie-grid,
  .detail-grid,
  .info-panel,
  .server-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 24px, 1420px);
  }

  .site-header,
  .filter-panel,
  .quick-stats,
  .feature-row,
  .site-footer,
  .movie-grid,
  .poster-grid,
  .detail-grid,
  .info-panel,
  .server-panel {
    grid-template-columns: 1fr;
  }

  .site-header,
  .section-head,
  .player-card__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    justify-content: flex-start;
  }
}
