:root {
  --bg: #08141b;
  --panel: rgba(8, 20, 27, 0.76);
  --panel-strong: rgba(5, 14, 19, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eff6f7;
  --muted: #b5c9cd;
  --accent: #7fe7c5;
  --accent-strong: #10b981;
  --danger: #ff7f7f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(127, 231, 197, 0.2), transparent 28%),
    linear-gradient(135deg, #071117 0%, #0f2430 55%, #0b1720 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  pointer-events: none;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.media-slot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity var(--transition-ms, 1200ms) ease, transform var(--transition-ms, 1200ms) ease;
}

.media-slot.active {
  opacity: 1;
  transform: scale(1);
}

.media-slot img,
.media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  margin-bottom: 10px;
}

.brand h1,
.panel-card h2 {
  margin: 0;
  line-height: 1;
}

.brand h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.brand p,
.panel-card p,
.empty-state,
.helper {
  color: var(--muted);
}

.panel-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

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

.score-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  animation: scoreRowIn 700ms ease both;
}

.score-row:nth-child(1) { animation-delay: 80ms; }
.score-row:nth-child(2) { animation-delay: 140ms; }
.score-row:nth-child(3) { animation-delay: 200ms; }
.score-row:nth-child(4) { animation-delay: 260ms; }
.score-row:nth-child(5) { animation-delay: 320ms; }

.score-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(127, 231, 197, 0.14);
  color: var(--accent);
  font-weight: 700;
}

.score-name {
  font-weight: 600;
}

.score-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.scoreboard-slide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: end;
  width: 100%;
  height: 100%;
  padding: 42px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.26), transparent 30%),
    radial-gradient(circle at bottom right, rgba(127, 231, 197, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(4, 15, 20, 0.55), rgba(7, 17, 23, 0.18));
}

.scoreboard-slide::before {
  content: "";
  position: absolute;
  inset: 6% auto auto 4%;
  width: min(44vw, 520px);
  height: min(44vw, 520px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(127, 231, 197, 0.18), transparent 68%);
  filter: blur(10px);
  animation: scoreboardFloat 10s ease-in-out infinite;
}

.scoreboard-slide::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: min(24vw, 260px);
  height: min(24vw, 260px);
  border-radius: 28px;
  border: 1px solid rgba(127, 231, 197, 0.18);
  background: linear-gradient(135deg, rgba(127, 231, 197, 0.08), rgba(255, 255, 255, 0.01));
  transform: rotate(14deg);
  animation: scoreboardDrift 12s ease-in-out infinite;
}

.scoreboard-stage-brand,
.scoreboard-stage-card {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(7, 18, 24, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.scoreboard-stage-brand {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 36px;
}

.scoreboard-stage-brand h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  line-height: 0.95;
}

.scoreboard-stage-brand p {
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.scoreboard-stage-card {
  padding: 30px;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.admin-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(8, 20, 27, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.admin-card h2 {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--muted);
  font-size: 0.95rem;
}

.field input,
.field textarea,
.button,
.icon-button {
  font: inherit;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.icon-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #041116;
  font-weight: 700;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.icon-button {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.upload-list,
.media-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.media-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.media-thumb {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-actions {
  display: flex;
  gap: 8px;
}

.status {
  min-height: 24px;
  margin-top: 10px;
  color: var(--accent);
}

.status.error {
  color: var(--danger);
}

@keyframes scoreboardFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(24px, -18px, 0) scale(1.06);
  }
}

@keyframes scoreboardDrift {
  0%,
  100% {
    transform: rotate(14deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(10deg) translate3d(-16px, 18px, 0);
  }
}

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

@media (max-width: 1024px) {
  .admin-grid,
  .scoreboard-slide {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 58vh;
  }

  .scoreboard-slide {
    align-items: stretch;
    padding: 22px;
  }
}
