:root {
  --bg: #07070f;
  --panel: #12121f;
  --panel-2: #1b1b2e;
  --line: #2a2a44;
  --text: #f2f2fa;
  --muted: #8d8db0;
  --magenta: #ff2bd6;
  --cyan: #1fd8ff;
  --yellow: #ffe61c;
  --danger: #ff4d6d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100dvh;
  background-image:
    radial-gradient(60% 40% at 50% 0%, rgba(255, 43, 214, 0.14), transparent 70%),
    radial-gradient(55% 40% at 50% 100%, rgba(31, 216, 255, 0.12), transparent 70%);
  background-attachment: fixed;
}

h1 { font-family: 'Orbitron', system-ui, sans-serif; letter-spacing: 0.04em; }

button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Home ---------- */

.home {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.home-logo h1 {
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  font-weight: 900;
  margin: 4px 0;
  font-style: italic;
  text-shadow: 0 0 18px rgba(255, 43, 214, 0.55);
}

.home-logo .accent { color: var(--magenta); }

.arrows {
  color: var(--cyan);
  font-size: 1.4rem;
  letter-spacing: 0.6em;
  text-shadow: 0 0 12px rgba(31, 216, 255, 0.8);
}

.home-sub {
  color: var(--muted);
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(100%, 340px);
}

.queue-btn {
  display: block;
  padding: 26px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.queue-btn.magenta {
  border: 2px solid var(--magenta);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.45), inset 0 0 14px rgba(255, 43, 214, 0.12);
}

.queue-btn.cyan {
  border: 2px solid var(--cyan);
  box-shadow: 0 0 16px rgba(31, 216, 255, 0.45), inset 0 0 14px rgba(31, 216, 255, 0.12);
}

/* ---------- Fila ---------- */

.queue {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.queue-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.queue-header h1 { font-size: 1.5rem; margin: 0; flex: 1; }

.queue-header.magenta h1 { color: var(--magenta); text-shadow: 0 0 14px rgba(255, 43, 214, 0.6); }
.queue-header.cyan h1 { color: var(--cyan); text-shadow: 0 0 14px rgba(31, 216, 255, 0.6); }

.back {
  color: var(--text);
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  padding: 2px 12px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.count { color: var(--muted); font-size: 0.8rem; }

.current-card {
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.current-card.magenta {
  border: 2px solid var(--magenta);
  animation: pulse-magenta 1.6s ease-in-out infinite;
}

.current-card.cyan {
  border: 2px solid var(--cyan);
  animation: pulse-cyan 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .current-card.magenta,
  .current-card.cyan { animation: none; }
}

.current-card.empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  justify-content: center;
  text-align: center;
}

@keyframes pulse-magenta {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 43, 214, 0.45), inset 0 0 12px rgba(255, 43, 214, 0.1); }
  50% { box-shadow: 0 0 26px rgba(255, 43, 214, 0.85), inset 0 0 18px rgba(255, 43, 214, 0.25); }
}

@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 10px rgba(31, 216, 255, 0.45), inset 0 0 12px rgba(31, 216, 255, 0.1); }
  50% { box-shadow: 0 0 26px rgba(31, 216, 255, 0.85), inset 0 0 18px rgba(31, 216, 255, 0.25); }
}

.current-label {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 230, 28, 0.6);
}

.current-name {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  flex: 1;
  overflow-wrap: anywhere;
}

.next-btn {
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0b0b14;
}

.next-btn.magenta { background: linear-gradient(135deg, var(--magenta), #ff7ae7); box-shadow: 0 0 18px rgba(255, 43, 214, 0.5); }
.next-btn.cyan { background: linear-gradient(135deg, var(--cyan), #8beaff); box-shadow: 0 0 18px rgba(31, 216, 255, 0.5); }

.next-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px;
}

.row.away { opacity: 0.55; }

.pos {
  font-family: 'Orbitron', system-ui, sans-serif;
  color: var(--yellow);
  font-size: 0.85rem;
  min-width: 2.2em;
  text-align: center;
}

.row-name { flex: 1; font-size: 1.05rem; overflow-wrap: anywhere; }

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  vertical-align: middle;
}

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

.icon-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.05rem;
}

.icon-btn.active { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255, 230, 28, 0.4); }

.icon-btn.confirm {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-size: 0.8rem;
  padding: 0 10px;
}

/* ---------- Formulário fixo ---------- */

.join-form {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(7, 7, 15, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  max-width: 520px;
  margin: 0 auto;
}

.join-form input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 14px;
  font-size: 1rem;
}

.join-form input:focus { outline: 2px solid var(--magenta); border-color: transparent; }

.join-btn {
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  background: var(--yellow);
  color: #0b0b14;
  font-weight: 700;
  font-family: 'Orbitron', system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 10;
  max-width: calc(100vw - 32px);
}
