:root {
  --black: #14110e;
  --black-soft: #211914;
  --ivory: #f3e9d8;
  --ivory-soft: #eadfcb;
  --amber: #bd8d3f;
  --amber-light: #d7ab63;
  --wine: #732528;
  --wine-deep: #4b1718;
  --text: #f7edd8;
  --muted: rgba(247, 237, 216, 0.72);
  --panel: rgba(18, 14, 11, 0.72);
  --panel-strong: rgba(12, 10, 8, 0.9);
  --line: rgba(247, 237, 216, 0.18);
  --line-strong: rgba(247, 237, 216, 0.34);
  --danger: #df8b82;
  --ok: #9fd7a7;
  --radius: 18px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font: 15px/1.55 "Libre Baskerville", Georgia, serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(189, 141, 63, 0.18), transparent 34rem),
    linear-gradient(180deg, rgba(8, 7, 6, 0.3), rgba(8, 7, 6, 0.9)),
    url("/assets/bartostageview.jpeg") center 32% / cover fixed no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 17, 14, 0.94), rgba(20, 17, 14, 0.66) 48%, rgba(20, 17, 14, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 7rem);
}

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, transparent 0 58%, rgba(10, 8, 7, 0.88)),
    radial-gradient(circle at 78% 16%, rgba(115, 37, 40, 0.32), transparent 28rem);
}

.ppv-masthead {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 2.2vw, 1.6rem) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ppv-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ivory);
  text-decoration: none;
}

.ppv-brand img {
  width: clamp(6.2rem, 12vw, 9.5rem);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.ppv-brand span,
.ppv-nav a,
.eyebrow,
.btn,
th,
label,
.watch-meta strong,
.ppv-details dt {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ppv-brand span {
  padding-left: 0.9rem;
  border-left: 1px solid rgba(247, 237, 216, 0.32);
  font-size: 0.78rem;
  color: rgba(247, 237, 216, 0.78);
}

.ppv-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ppv-nav a {
  color: rgba(247, 237, 216, 0.82);
  text-decoration: none;
  font-size: 0.76rem;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.ppv-nav a:hover {
  color: var(--ivory);
  border-color: currentColor;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: clamp(1rem, 2vw, 2rem) auto clamp(3rem, 7vw, 6rem);
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  animation: surfaceIn 0.7s ease both;
}

.ppv-home {
  animation: surfaceIn 0.7s ease both;
}

.ppv-hero {
  position: relative;
  min-height: calc(100svh - 88px);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(247, 237, 216, 0.16);
}

.ppv-hero__media,
.ppv-hero__wash {
  position: absolute;
  inset: 0;
}

.ppv-hero__media {
  background: url("/assets/bartostageview.jpeg") center 32% / cover no-repeat;
  transform: scale(1.04);
}

.ppv-hero__wash {
  background:
    radial-gradient(circle at 18% 24%, rgba(189, 141, 63, 0.24), transparent 28rem),
    linear-gradient(84deg, rgba(8, 7, 6, 0.92) 0%, rgba(8, 7, 6, 0.67) 48%, rgba(75, 23, 24, 0.82) 100%);
}

.ppv-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 0;
  display: grid;
  gap: 1rem;
}

.ppv-hero h1,
h1,
h2 {
  margin: 0;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  line-height: 0.96;
}

.ppv-hero h1 {
  max-width: 13ch;
  font-size: clamp(3.3rem, 11vw, 9rem);
}

h1 {
  font-size: clamp(2.25rem, 5.8vw, 5.3rem);
}

h2 {
  font-size: clamp(1.25rem, 2.8vw, 2.05rem);
}

.eyebrow {
  margin: 0;
  color: var(--amber-light);
  font-size: clamp(0.72rem, 1.3vw, 0.88rem);
}

.ppv-hero__lead {
  max-width: 46rem;
  margin: 0;
  color: rgba(247, 237, 216, 0.9);
  font-size: clamp(1rem, 1.65vw, 1.28rem);
}

.ppv-hero__actions,
.actions,
.watch-exit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ppv-details {
  width: min(44rem, 100%);
  margin: clamp(1rem, 2.8vw, 2.2rem) 0 0;
  display: grid;
  gap: 0;
  border-block: 1px solid rgba(247, 237, 216, 0.24);
}

.ppv-details div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(247, 237, 216, 0.12);
}

.ppv-details div:last-child {
  border-bottom: 0;
}

.ppv-details dt,
.ppv-details dd {
  margin: 0;
}

.ppv-details dt {
  color: rgba(247, 237, 216, 0.62);
  font-size: 0.72rem;
}

.ppv-details dd {
  min-width: 0;
}

.card,
.admin-head,
.watch-head,
.notice,
.flash {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card,
.admin-head,
.watch-head {
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.2vw, 1.8rem);
}

.auth .card,
.state-card {
  width: min(100%, 560px);
  margin-inline: auto;
}

.auth-intro,
p,
li {
  color: var(--muted);
}

p {
  margin: 0.55rem 0;
}

a {
  color: var(--amber-light);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border: 1px solid rgba(215, 171, 99, 0.34);
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  background: linear-gradient(130deg, var(--amber-light), var(--amber));
  color: #15110e;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

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

.btn-secondary {
  background: rgba(247, 237, 216, 0.08);
  color: var(--ivory);
  border-color: rgba(247, 237, 216, 0.28);
}

.btn-secondary:hover {
  background: rgba(247, 237, 216, 0.14);
}

.stack {
  display: grid;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: rgba(247, 237, 216, 0.74);
  font-size: 0.76rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(8, 7, 6, 0.58);
  color: var(--ivory);
  border: 1px solid rgba(247, 237, 216, 0.22);
  border-radius: 12px;
  padding: 0.82rem 0.9rem;
  outline: none;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(215, 171, 99, 0.72);
  background: rgba(8, 7, 6, 0.78);
}

textarea {
  resize: vertical;
}

code {
  color: var(--ivory);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.flash,
.notice {
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.flash-success {
  background: rgba(39, 96, 59, 0.28);
  border-color: rgba(159, 215, 167, 0.42);
}

.flash-error {
  background: rgba(115, 37, 40, 0.45);
  border-color: rgba(223, 139, 130, 0.52);
}

.notice {
  background: rgba(115, 37, 40, 0.34);
  color: var(--ivory);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.grid .full {
  grid-column: 1 / -1;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.check input {
  width: auto;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(247, 237, 216, 0.12);
  padding: 0.85rem 0.65rem;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: rgba(247, 237, 216, 0.64);
  font-size: 0.72rem;
}

td {
  color: rgba(247, 237, 216, 0.84);
}

.watch {
  width: min(1280px, calc(100% - 2rem));
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
}

.watch-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  background:
    radial-gradient(circle at 8% 12%, rgba(215, 171, 99, 0.18), transparent 21rem),
    linear-gradient(128deg, rgba(11, 10, 9, 0.9), rgba(75, 23, 24, 0.56));
}

.watch-title {
  display: grid;
  gap: 0.5rem;
}

.watch-title h1 {
  max-width: 14ch;
}

.watch-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.watch-meta span {
  display: inline-grid;
  gap: 0.12rem;
  min-width: min(14rem, 100%);
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(247, 237, 216, 0.16);
  border-radius: 14px;
  background: rgba(8, 7, 6, 0.34);
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-meta strong {
  color: rgba(247, 237, 216, 0.56);
  font-size: 0.66rem;
}

.watch-status--live {
  border-color: rgba(159, 215, 167, 0.4) !important;
  box-shadow: inset 0 0 0 1px rgba(159, 215, 167, 0.08);
}

.watch-stage {
  display: grid;
  gap: 1rem;
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: clamp(14px, 2vw, 24px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(189, 141, 63, 0.18), transparent 26rem),
    #000;
  border: 1px solid rgba(247, 237, 216, 0.2);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.56);
}

.player-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 36%, rgba(215, 171, 99, 0.16), transparent 25%),
    linear-gradient(135deg, rgba(115, 37, 40, 0.22), transparent 46%);
  opacity: 1;
  transition: opacity 0.25s ease;
}

#ppv-player {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-status {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(70%, 28rem);
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 237, 216, 0.22);
  background: rgba(0, 0, 0, 0.58);
  color: rgba(247, 237, 216, 0.82);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
}

.player-status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--amber-light);
  box-shadow: 0 0 0 0 rgba(215, 171, 99, 0.45);
  animation: pulseLive 1.5s ease infinite;
}

.player-wrap[data-player-state="playing"] .player-status__dot,
.player-wrap[data-player-state="ready"] .player-status__dot {
  background: var(--ok);
}

.player-wrap[data-player-state="error"] .player-status__dot {
  background: var(--danger);
  animation: none;
}

.player-wrap[data-player-state="playing"] .player-ambient,
.player-wrap[data-player-state="ready"] .player-ambient {
  opacity: 0;
}

.watermark {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  z-index: 3;
  max-width: min(70%, 34rem);
  padding: 0.48rem 0.62rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(247, 237, 216, 0.22);
  color: rgba(247, 237, 216, 0.72);
  font: 0.72rem/1.2 "SFMono-Regular", Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-note {
  color: rgba(247, 237, 216, 0.62);
  font-size: 0.88rem;
}

.watch-support {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.watch-support p {
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(247, 237, 216, 0.14);
  color: rgba(247, 237, 216, 0.68);
  font-size: 0.9rem;
}

.watch-support strong {
  color: var(--ivory);
}

@keyframes pulseLive {
  0% {
    box-shadow: 0 0 0 0 rgba(215, 171, 99, 0.45);
  }
  70% {
    box-shadow: 0 0 0 0.55rem rgba(215, 171, 99, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(215, 171, 99, 0);
  }
}

@keyframes surfaceIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .ppv-masthead {
    align-items: flex-start;
  }

  .ppv-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .ppv-brand span {
    padding-left: 0;
    border-left: 0;
  }

  .grid,
  .ppv-details div {
    grid-template-columns: 1fr;
  }

  .watch-head,
  .watch-support {
    grid-template-columns: 1fr;
  }

  .ppv-hero {
    min-height: calc(100svh - 112px);
  }

  .ppv-hero h1 {
    font-size: clamp(3rem, 16vw, 5.3rem);
  }
}

@media (max-width: 620px) {
  .container,
  .watch,
  .ppv-masthead,
  .ppv-hero__inner {
    width: min(100% - 1rem, 1180px);
  }

  .card,
  .admin-head,
  .watch-head {
    padding: 1rem;
  }

  .btn {
    width: 100%;
  }

  .ppv-hero__actions,
  .actions,
  .watch-exit {
    align-items: stretch;
    flex-direction: column;
  }

  .player-status,
  .watermark {
    max-width: calc(100% - 1.7rem);
  }

  .watermark {
    top: auto;
    bottom: 0.85rem;
  }
}
