*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #6366f1;
  --accent-hover: #4f52d9;
  --radius: 12px;
  --font: 'Inter', system-ui, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Landing ── */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.logo-dot {
  color: var(--text-muted);
}

.logo-brand {
  color: var(--text-muted);
  font-weight: 500;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -0.75rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--accent);
}

.field input::placeholder {
  color: #555;
}

.room-input-row {
  display: flex;
  gap: 0.5rem;
}

.room-input-row input {
  flex: 1;
}

#random-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 0.75rem;
  transition: border-color 0.15s, color 0.15s;
}

#random-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.field-hint {
  font-size: 0.78rem;
  color: #555;
}

.btn-primary {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  text-align: center;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 0.25rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.footer {
  font-size: 0.78rem;
  color: #444;
}

.footer a {
  color: #555;
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-muted);
}

/* ── Meeting page ── */

.meeting-body {
  overflow: hidden;
}

.meeting-container {
  width: 100vw;
  height: 100vh;
}

.meeting-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Loading / Error screens ── */

.loading-screen,
.error-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── End screen ──────────────────────────────────────────────────────────── */

.end-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.end-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.end-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.end-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.end-actions .btn-primary,
.end-actions .btn-secondary {
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: block;
}

.hidden {
  display: none !important;
}
