/* theme.css — shared design tokens for all three themes.
   Signature element: the "signal mark" (three pulsing dots representing a
   live connection) recurs across homepage + in-room UI as the brand's
   visual anchor for "we are live." */

:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-soft: 0 12px 40px rgba(0,0,0,0.28);
  --shadow-lift: 0 4px 16px rgba(0,0,0,0.22);

  --transition-fast: 150ms ease;
  --transition-med: 260ms cubic-bezier(.4,0,.2,1);
}

/* ---------- DARK (default) ---------- */
[data-theme="dark"] {
  --bg: #0E1116;
  --bg-elevated: #171B22;
  --bg-elevated-2: #1E232B;
  --text: #EDEFF3;
  --text-muted: #9AA3B2;
  --border: rgba(255,255,255,0.08);
  --accent: #C9A15A;          /* muted gold, echoes PZG brand without borrowing its cream base */
  --accent-contrast: #14171C;
  --danger: #E5484D;
  --success: #3DBE7A;
  --tile-bg: #12151B;
  --overlay: rgba(8, 9, 12, 0.72);
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg: #F6F5F2;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #EFEDE7;
  --text: #1B1D22;
  --text-muted: #64686F;
  --border: rgba(20,20,20,0.10);
  --accent: #A9762F;
  --accent-contrast: #FFFFFF;
  --danger: #C4302B;
  --success: #227A4E;
  --tile-bg: #E9E7E1;
  --overlay: rgba(255,255,255,0.82);
}

/* ---------- VALENTINE RED ---------- */
[data-theme="red"] {
  --bg: #1A0B0E;
  --bg-elevated: #2A1216;
  --bg-elevated-2: #34161B;
  --text: #F7EAE9;
  --text-muted: #C89A9C;
  --border: rgba(255,255,255,0.10);
  --accent: #E23E57;
  --accent-contrast: #FFFFFF;
  --danger: #FF6B6B;
  --success: #4CBE8E;
  --tile-bg: #221013;
  --overlay: rgba(20, 6, 8, 0.75);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-med), color var(--transition-med);
}

::selection { background: var(--accent); color: var(--accent-contrast); }

button { font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-icon { width: 18px; height: 18px; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-elevated); }

.btn--icon-only {
  padding: 12px;
  border-radius: 50%;
}

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }

/* Reduced motion respected everywhere */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Modal (shared) ---------- */
.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  width: min(420px, 92vw);
}
.modal::backdrop { background: var(--overlay); backdrop-filter: blur(3px); }

.modal-card { padding: 32px; display: flex; flex-direction: column; gap: 6px; }
.modal-title { font-family: var(--font-display); font-size: 24px; margin: 0 0 4px; font-weight: 600; }
.modal-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 14px; }

.field-label { font-size: 13px; color: var(--text-muted); margin-top: 14px; margin-bottom: 6px; }
.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.field-input:focus { border-color: var(--accent); }
.field-error { color: var(--danger); font-size: 13px; margin: 6px 0 0; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
