:root {
  --bg: #090909;
  --panel: rgba(14, 14, 18, 0.9);
  --panel-soft: rgba(26, 25, 36, 0.9);
  --line: rgba(255, 212, 59, 0.18);
  --text: #f6f2e8;
  --muted: #b3a995;
  --gold: #ffc62e;
  --gold-soft: rgba(255, 198, 46, 0.18);
  --violet: #7f46ff;
  --electric: #2b8cff;
  --green: #4bff4b;
  --danger: #ff6c5b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Arial Black", "Avenir Next Condensed", "Segoe UI", sans-serif;
  --font-body: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
}

.app-shell,
.dashboard-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(127, 70, 255, 0.28), transparent 34%),
    radial-gradient(circle at top right, rgba(43, 140, 255, 0.18), transparent 30%),
    radial-gradient(circle at bottom, rgba(255, 198, 46, 0.12), transparent 32%),
    linear-gradient(180deg, #08080a 0%, #111016 55%, #0b0d10 100%);
  overflow-x: hidden;
}

.display-shell {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.display-corner {
  pointer-events: none;
}

.display-logo-card,
.display-qr-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 198, 46, 0.22);
  background: linear-gradient(180deg, rgba(13, 16, 26, 0.94), rgba(6, 8, 15, 0.88));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.display-logo-card {
  padding: 1rem 1.2rem;
  min-width: 20rem;
}

.display-qr-card {
  padding: 0.9rem 1rem;
  text-align: center;
  min-width: 10.5rem;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  pointer-events: none;
}

.aurora-a {
  top: -8rem;
  left: -8rem;
  background: rgba(127, 70, 255, 0.45);
}

.aurora-b {
  right: -8rem;
  bottom: 20%;
  background: rgba(43, 140, 255, 0.28);
}

.mobile-layout {
  position: relative;
  z-index: 1;
  width: min(100%, 31rem);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.brand-header {
  margin-bottom: 1rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-wave {
  display: inline-flex;
  width: 1rem;
  height: 3.5rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--violet));
  box-shadow:
    0 0 0 6px rgba(255, 198, 46, 0.08),
    0 0 24px rgba(255, 198, 46, 0.45);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

h1,
h2,
.status-primary,
.overlay-main,
.hero-content {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 0.95;
}

h2 {
  font-size: 1rem;
}

.brand-copy,
.status-secondary,
.field span,
.queue-meta,
.result-meta,
.selected-song,
.event-card,
.vote-totals,
.dev-hint,
.sidebar-link,
.hero-content,
.overlay-votes {
  color: var(--muted);
}

.status-strip,
.dashboard-top {
  display: grid;
  gap: 1rem;
}

.status-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.status-card,
.panel,
.overlay-card,
.qr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 19, 27, 0.95), rgba(9, 9, 12, 0.9));
  box-shadow: var(--shadow);
}

.status-card,
.panel,
.overlay-card,
.qr-card,
.hero-panel {
  padding: 1rem;
}

.status-label,
.pill,
.overlay-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-label,
.pill {
  background: rgba(255, 255, 255, 0.06);
}

.pill-warn {
  background: rgba(255, 198, 46, 0.16);
  color: var(--gold);
}

.pill-success {
  background: rgba(75, 255, 75, 0.16);
  color: #9dff9d;
}

.pill-accent {
  background: rgba(43, 140, 255, 0.16);
  color: #8dc0ff;
}

.panel-mobile {
  margin-bottom: 1rem;
}

.panel-note {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

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

.field {
  display: grid;
  gap: 0.45rem;
}

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 198, 46, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 198, 46, 0.12);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.button:hover,
.vote-button:hover,
.queue-action:hover,
.result-card:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #120c00;
  background: linear-gradient(135deg, var(--gold), #ffe58a);
}

.button-secondary {
  color: var(--text);
  background: linear-gradient(135deg, rgba(127, 70, 255, 0.85), rgba(43, 140, 255, 0.8));
}

.button-danger,
.queue-action-danger {
  background: linear-gradient(135deg, rgba(255, 108, 91, 0.92), rgba(187, 53, 42, 0.92));
  color: white;
}

.results-grid,
.queue-list {
  display: grid;
  gap: 0.8rem;
}

.result-card,
.queue-item,
.selected-song,
.event-card {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  padding: 0.9rem;
}

.result-card {
  cursor: pointer;
}

.result-card.selected {
  border-color: rgba(255, 198, 46, 0.55);
  background: var(--gold-soft);
}

.result-title,
.queue-title {
  color: var(--text);
  font-weight: 800;
}

.result-meta,
.queue-meta {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.result-score {
  margin-top: 0.6rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.empty-state {
  color: var(--muted);
}

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

.vote-button,
.queue-action {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.9rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.vote-button {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}

.vote-emoji {
  font-size: 2rem;
}

.vote-totals {
  margin-top: 0.9rem;
}

.dev-hint {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(255, 198, 46, 0.09);
}

.dashboard-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 19rem 1fr;
  gap: 1rem;
  padding: 1rem;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 1rem;
}

.sidebar-brand {
  margin-bottom: 1.5rem;
}

.sidebar-links {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sidebar-link {
  text-decoration: none;
}

.dashboard-main {
  display: grid;
  gap: 1rem;
}

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

.hero-content {
  font-size: 1rem;
  line-height: 1.4;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.queue-item[draggable="true"] {
  cursor: grab;
}

.queue-item.dragging {
  opacity: 0.55;
}

.queue-item.drag-target {
  border-color: rgba(255, 198, 46, 0.6);
  box-shadow: inset 0 0 0 2px rgba(255, 198, 46, 0.18);
}

.queue-item.is-new {
  border-color: rgba(255, 198, 46, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 198, 46, 0.2);
}

.queue-item.playing {
  border-color: rgba(75, 255, 75, 0.45);
}

.queue-item.next {
  border-color: rgba(43, 140, 255, 0.45);
}

.queue-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.queue-index {
  display: inline-flex;
  min-width: 2rem;
  justify-content: center;
  color: var(--gold);
}

.queue-action {
  padding: 0.7rem 0.9rem;
}

.overlay-shell {
  min-height: 100vh;
  background: #00c81e;
  color: white;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 2rem;
}

.display-top-strip {
  position: fixed;
  top: 1rem;
  left: 1.2rem;
  right: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  z-index: 2;
}

.display-card {
  min-height: 8rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 198, 46, 0.22);
  background: linear-gradient(180deg, rgba(13, 16, 26, 0.94), rgba(6, 8, 15, 0.88));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  padding: 0.9rem 1.1rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.display-card-current {
  border-color: rgba(75, 255, 75, 0.45);
}

.display-card-previous {
  border-color: rgba(127, 70, 255, 0.42);
}

.display-card-next {
  border-color: rgba(43, 140, 255, 0.42);
}

.display-main {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.7vw, 1.45rem);
  text-transform: uppercase;
  line-height: 1.18;
}

.display-votes,
.display-subline {
  margin-top: 0.4rem;
  color: #d6ccb4;
  font-size: 0.95rem;
}

.display-welcome {
  position: fixed;
  left: 50%;
  top: 2.5rem;
  transform: translateX(-50%);
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  background: rgba(13, 16, 26, 0.92);
  border: 1px solid rgba(255, 198, 46, 0.28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: var(--font-display);
  text-transform: uppercase;
  animation: pulse-in 420ms ease, glow-float 3.2s ease;
}

.display-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 0 1.2rem;
  pointer-events: none;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.overlay-logo .brand-wave {
  background: linear-gradient(180deg, #ffe15b, #8e56ff);
}

.qr-card {
  text-align: center;
  min-width: 10rem;
  background: rgba(10, 12, 18, 0.92);
}

.qr-title,
.qr-url {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.qr-box {
  margin: 0.75rem auto;
  width: 6.2rem;
  height: 6.2rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #fff 25%, #111 25%, #111 50%, #fff 50%, #fff 75%, #111 75%, #111 100%);
  background-size: 18px 18px;
  color: #f7d245;
  font-weight: 900;
}

.qr-image {
  display: block;
  width: 7rem;
  height: 7rem;
  margin: 0.75rem auto;
  padding: 0.45rem;
  border-radius: 14px;
  background: white;
}

.overlay-welcome {
  align-self: center;
  justify-self: center;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  background: rgba(16, 20, 32, 0.9);
  font-family: var(--font-display);
  font-size: 1.3rem;
  animation: pulse-in 420ms ease, glow-float 3.2s ease;
}

.overlay-footer {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 1rem;
  align-items: end;
}

.overlay-card {
  background: rgba(12, 14, 22, 0.94);
}

.overlay-card-current {
  border-color: rgba(75, 255, 75, 0.5);
}

.overlay-card-next {
  border-color: rgba(43, 140, 255, 0.5);
}

.overlay-card-previous {
  border-color: rgba(127, 70, 255, 0.45);
}

.overlay-main {
  margin-top: 0.7rem;
  font-size: clamp(1rem, 2.2vw, 1.7rem);
  line-height: 1.2;
}

.overlay-votes {
  margin-top: 0.7rem;
  font-size: 1rem;
}

@keyframes pulse-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glow-float {
  0% {
    box-shadow: 0 0 0 rgba(255, 198, 46, 0);
  }

  50% {
    box-shadow: 0 0 28px rgba(255, 198, 46, 0.35);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 198, 46, 0);
  }
}

.edit-modal {
  width: min(42rem, calc(100vw - 2rem));
  border: 0;
  background: transparent;
  padding: 0;
}

.edit-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.edit-panel {
  margin: 4rem auto;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .dashboard-top {
    grid-template-columns: 1fr;
  }

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

  .display-top-strip {
    position: static;
    grid-template-columns: 1fr;
    padding: 1rem 1rem 0;
  }

  .display-footer {
    position: static;
    padding: 1rem 1rem 1.4rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .status-strip,
  .vote-grid {
    grid-template-columns: 1fr;
  }

  .overlay-shell {
    padding: 1rem;
  }

  .overlay-header {
    gap: 1rem;
    flex-direction: column;
  }
}
