@font-face {
  font-family: "Bebas Neue";
  src: url("/BebasNeueRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-header: #0a0a0b;
  --bg: #1a1a1e;
  --bg-panel: #212126;
  --bg-panel-alt: #29292f;
  --gold: #d4a72c;
  --gold-dim: #8a7126;
  --text: #f2f2f2;
  --text-dim: #9a9a9e;
  --blue: #4fa3e8;
  --orange: #e2a34d;
  --green: #4caf6a;
  --green-hover: #3f9c5b;
  --red: #e2585c;
  --red-hover: #cf4448;
  --ok: #4caf6a;
  --bad: #e2585c;
  --radius: 6px;
  font-family: "Bebas Neue", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 19px;
}

html, body, #root {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3 {
  color: var(--text);
}

button {
  cursor: pointer;
  border: none;
  background: var(--bg-panel-alt);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.4rem 1.1rem;
  /* letter-spacing adds space after the last character too, which by
     itself would make the right padding look bigger than the left —
     pulling it back in here keeps the label visually centered. */
  padding-right: calc(1.1rem - 0.06em);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  -webkit-text-stroke: 0.15px currentColor;
  transition: background 0.15s, transform 0.1s;
}

button:hover:not(:disabled) {
  background: #26262b;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.btn-primary {
  background: var(--green);
  color: #08150c;
}

button.btn-primary:hover:not(:disabled) {
  background: var(--green-hover);
}

button.btn-danger {
  background: var(--red);
  color: #ffffff;
}

button.btn-danger:hover:not(:disabled) {
  background: var(--red-hover);
}

button.btn-gold {
  background: var(--gold);
  color: #201804;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.btn-gold:hover:not(:disabled) {
  background: var(--gold-dim);
}

input, select {
  background: var(--bg-panel-alt);
  border: none;
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

input:focus, select:focus, button:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.error-text {
  color: var(--bad);
  font-size: 0.9rem;
}

.value-blue { color: var(--blue); font-weight: 600; }
.value-orange { color: var(--orange); font-weight: 600; }

/* Shared card + header language (kick-dialog style) */
.card {
  background: var(--bg-panel);
  border-radius: var(--radius);
}

.panel-title {
  margin: 0 0 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  font-weight: 800;
}

/* Login */
.login-screen {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.75rem 2rem 2rem;
  width: min(360px, 100%);
  text-align: center;
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8);
}

.brand-logo {
  display: block;
  height: 64px;
  width: auto;
  margin: 0 auto 1.25rem;
}

.brand-logo--header {
  height: 36px;
  margin: 0;
}

.login-card p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Club */
.club-screen {
  position: relative;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Ambient backdrop — soft, slowly drifting blobs of light in the brand
   colors, like a dance floor light rig glimpsed through fog. Sits behind
   everything (z-index -1 inside the isolated stacking context created
   above) so it never interferes with clicks/readability. Speeds up while a
   track is actually playing. */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.ambient-blob {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: ambient-drift 24s ease-in-out infinite, ambient-pulse 7s ease-in-out infinite;
}

.ambient-blob--gold {
  top: -12%;
  left: -10%;
  background: var(--gold);
}

.ambient-blob--blue {
  top: 15%;
  right: -16%;
  background: var(--blue);
  animation-duration: 28s, 8s;
  animation-delay: -7s, -2s;
}

.ambient-blob--red {
  bottom: -18%;
  left: 12%;
  background: var(--red);
  animation-duration: 20s, 6s;
  animation-delay: -14s, -4s;
}

.ambient-blob--green {
  bottom: 0%;
  right: 8%;
  background: var(--green);
  animation-duration: 26s, 9s;
  animation-delay: -19s, -1s;
}

.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 88%);
}

@keyframes ambient-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(9%, 6%) scale(1.12); }
  50% { transform: translate(-6%, 11%) scale(0.94); }
  75% { transform: translate(7%, -9%) scale(1.06); }
}

@keyframes ambient-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.42; }
}

/* Music actually playing — same motion, noticeably livelier pace. */
.ambient-bg--live .ambient-blob {
  animation-duration: 9s, 2.4s;
}

.ambient-bg--live .ambient-blob--blue {
  animation-duration: 10s, 2.1s;
}

.ambient-bg--live .ambient-blob--red {
  animation-duration: 8s, 2.6s;
}

.ambient-bg--live .ambient-blob--green {
  animation-duration: 9.5s, 2.3s;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-blob {
    animation: none;
    opacity: 0.22;
  }
}

.club-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--gold);
  background: var(--bg-header);
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Spotlights along the top gold border line */
.club-spotlights-container {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 10;
}

.spotlight-fixture {
  position: absolute;
  top: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spotlight-lamp {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 12;
  transition: transform 0.3s, box-shadow 0.3s;
}

.spotlight-fixture.is-playing .spotlight-lamp {
  transform: scale(1.6);
}

.spotlight-beam {
  position: absolute;
  top: 0px;
  width: 260px;
  height: 750px;
  transform-origin: top center;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.65;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: spotlight-sweep 5s ease-in-out infinite alternate;
}

.spotlight-fixture.is-playing .spotlight-beam {
  opacity: 0.9;
  filter: brightness(1.3);
}

@keyframes spotlight-sweep {
  0% {
    transform: rotate(-30deg) scaleX(0.85);
  }
  50% {
    transform: rotate(0deg) scaleX(1.1);
  }
  100% {
    transform: rotate(30deg) scaleX(0.85);
  }
}

.club-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.club-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.volume-control input[type="range"] {
  width: 90px;
  accent-color: var(--gold);
  background: none;
  padding: 0;
}

.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }

.club-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 480px) 320px;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .club-main {
    grid-template-columns: 1fr;
  }
}

.club-main__player {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-player {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.dj-player__frame {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dj-player__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  pointer-events: none;
}

.now-playing {
  color: var(--text-dim);
  margin: 0;
}

.dj-player__unlock {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  border: none;
  color: #201804;
  font-weight: 700;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px -4px rgba(212, 167, 44, 0.7);
  animation: pulse-unlock 1.6s ease-in-out infinite;
}

@keyframes pulse-unlock {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04); }
}

.dj-controls {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: 480px;
}

.dj-controls__row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dj-controls__row input {
  flex: 1;
}

.song-requests {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: 480px;
}

.song-requests .dj-controls__row input {
  flex: 1;
}

.hint-text {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

.request-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.request-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  background: var(--bg-panel-alt);
}

/* The queue lives in the narrower sidebar, so its rows (thumbnail + name +
   up to 4 buttons) don't fit on one line the way the wider request list
   does — stack the action buttons onto their own row instead of letting
   them get squeezed and wrap mid-word. */
.queue-list li {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.queue-item__info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.queue-item__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.queue-item__actions button {
  flex: 1;
  min-width: 3rem;
}

.queue-item__actions button.btn-gold {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  min-width: 0;
  padding: 0;
}

.queue-item__actions button.btn-gold svg {
  width: 17px;
  height: 17px;
}

.request-list .empty {
  color: var(--text-dim);
  background: none;
}

.request-thumb {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.request-spacer {
  flex: 1;
}

.request-list button {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

.club-main__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: fit-content;
}

.taglist {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.taglist__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
}

.taglist__header .panel-title {
  margin: 0;
  padding: 0;
  border: none;
}

.now-playing-tag {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.taglist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.taglist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius);
  background: var(--bg-panel-alt);
  line-height: 1;
}

.taglist .status-icon {
  flex-shrink: 0;
  color: var(--text-dim);
  position: relative;
  top: 2px;
}

.taglist li.listening .status-icon {
  color: var(--ok);
  filter: drop-shadow(0 0 4px var(--ok));
}

.taglist li.muted .status-icon {
  color: var(--bad);
}

.taglist .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--blue);
  font-weight: 600;
}

.taglist .role-badge {
  font-size: 0.7rem;
  color: var(--orange);
  background: rgba(226, 163, 77, 0.15);
  border-radius: var(--radius);
  padding: 0.1rem 0.5rem;
  font-weight: 700;
}

.taglist .status {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.taglist .empty {
  color: var(--text-dim);
  background: none;
}

/* Admin */
.admin-screen {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.75rem 2rem 2rem;
  background: var(--bg-panel);
  border-radius: var(--radius);
}

.admin-add-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

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

.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
}

.admin-table tbody tr:nth-child(odd) {
  background: var(--bg-panel-alt);
}

.admin-table th {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Sync Overlay */
.sync-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  animation: fadeIn 0.2s ease-out;
}

.sync-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(212, 167, 44, 0.15);
  border-top-color: var(--gold);
  border-right-color: var(--gold);
  border-radius: 50%;
  animation: sync-spin 0.75s linear infinite;
}

@keyframes sync-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sync-text {
  color: var(--gold);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  animation: sync-pulse 1.5s ease-in-out infinite;
}

@keyframes sync-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.97); }
}
