:root {
  --bg: #081421;
  --bg-2: #0f2437;
  --panel: #10283ddd;
  --line: #74d4d444;
  --text: #edf7ff;
  --muted: #a7bfd1;
  --accent: #ffd166;
  --accent-2: #f89d24;
  --ok: #48ca9a;
  --danger: #ff7b7b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 22% 16%, #19486b 0%, transparent 34%),
    radial-gradient(circle at 82% 10%, #1d6f62 0%, transparent 28%),
    linear-gradient(150deg, var(--bg), var(--bg-2));
}

.bg-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-glow.left {
  left: -70px;
  bottom: -80px;
  background: #2dd4bf;
}

.bg-glow.right {
  right: -70px;
  top: -80px;
  background: #f9c74f;
}

.guest-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-card {
  background: var(--surface, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.guest-card h1 {
  margin: 0;
}

.guest-card .lead {
  margin: 0;
  opacity: 0.7;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.guest-title {
  letter-spacing: 0.08em;
  color: #ffd166;
}

h1,
h2 {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.lead {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-zone {
  min-width: 250px;
}

.auth-user {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.button {
  border: 1px solid #00000000;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #1a222e;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.button.warning {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--text);
}

.create-form {
  display: grid;
  gap: 8px;
}

.pill-selector {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.participant-limit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.pill-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 72px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease, border-color 130ms ease;
}

.pill-btn.active {
  color: #1a222e;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.pill-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px #f5a52433;
}

.pill-btn:focus-visible,
.pill-custom-input:focus-visible {
  outline: 2px solid #f9c74f;
  outline-offset: 2px;
}

.pill-custom-input {
  width: 72px;
  min-width: 72px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-align: center;
  padding: 0 10px;
  font-weight: 700;
  line-height: 1;
  /*appearance: textfield;*/
}

.pill-custom-input::-webkit-outer-spin-button,
.pill-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1f30c9;
  color: var(--text);
  padding: 10px;
  font-family: inherit;
}

.status {
  min-height: 1.3em;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--ok);
}

.session-list {
  display: grid;
  gap: 8px;
}

.session-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.session-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.session-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.session-meta-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: fit-content;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0a1f30cf;
  font-size: 0.86rem;
  font-weight: 700;
}

.status-waiting {
  color: var(--accent);
  border-color: #ffd16666;
  background: #4e3a1099;
}

.status-running {
  color: var(--ok);
  border-color: #48ca9a66;
  background: #143c3199;
}

.status-finished {
  color: var(--danger);
  border-color: #ff7b7b66;
  background: #4a232399;
}

.session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .hero {
    flex-direction: column;
  }

  .auth-user {
    justify-items: start;
  }
}

.hero-viewer {
  padding: 32px;
}

.history-item {
  gap: 10px;
}

.mini-grid-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.mini-grid-cell-preview {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  background: #0a1f30cf;
}

.mini-grid-cell-preview.marked {
  border-color: #48ca9a99;
  background: #48ca9a2f;
}
