@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #05070a;
  --bg-2: #090c11;
  --surface: #11151d;
  --surface-2: #181d28;
  --border: #242b3a;
  --text: #eef1f6;
  --text-dim: #838ea3;

  /* Brand palette, pulled from the XIRO logo (blue -> green gradient) */
  --accent: #00c2ff;
  --accent-2: #00ff8f;
  --accent-dim: #0a7fae;
  --gradient-brand: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);

  --danger: #ff5d5d;
  --warning: #ffb545;
  --radius: 12px;
  --font-display: 'Space Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(0, 194, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 900px 500px at 100% 10%, rgba(0, 255, 143, 0.10), transparent 60%);
  background-repeat: no-repeat;
}

a { color: var(--accent); }

/* --- Brand mark: shows the real logo once /img/logo.webp exists, --- */
/* --- falls back to a styled gradient wordmark until then.        --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo-img {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- Signature mark: small "equalizer" bars that signal "live" --- */
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.eq span {
  display: block;
  width: 3px;
  background: var(--gradient-brand);
  border-radius: 1px;
  animation: eq-bounce 1.1s ease-in-out infinite;
}
.eq span:nth-child(1) { animation-delay: -0.9s; }
.eq span:nth-child(2) { animation-delay: -0.6s; }
.eq span:nth-child(3) { animation-delay: -0.3s; }
.eq span:nth-child(4) { animation-delay: 0s; }
@keyframes eq-bounce {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .eq span { animation: none; height: 8px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.card-hover:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 8px 24px rgba(0, 194, 255, 0.08);
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.05s ease, filter 0.15s ease;
}
.btn:hover { border-color: var(--accent-dim); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--gradient-brand);
  color: #04121a;
  border: none;
  box-shadow: 0 4px 18px rgba(0, 194, 255, 0.25);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: rgba(255, 93, 93, 0.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

input[type="text"], input[type="password"] {
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 12px 14px;
  width: 100%;
}
input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input::placeholder { color: var(--text-dim); }

.badge {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  display: inline-block;
}
.badge-danger { background: rgba(255, 93, 93, 0.15); color: var(--danger); }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent-dim);
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
}
.queue-item + .queue-item { margin-top: 6px; }
.queue-item img.thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface-2);
}
.queue-item .meta { min-width: 0; flex: 1; }
.queue-item .title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item .sub {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.queue-index {
  font-family: var(--font-display);
  color: var(--text-dim);
  font-size: 12px;
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.empty-state {
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
  padding: 24px 12px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 100;
  max-width: 90vw;
}
.toast.show { opacity: 1; }
.toast.error { border-color: var(--danger); color: var(--danger); }

.hidden-view { display: none !important; }
