/* ==========================================================================
   mixer-base.css
   Shared tokens and components for Mixer Games (host + player).
   Colors match the DateRounds site theme (style-main.css).
   ========================================================================== */

/* ---------- Theme tokens ---------- */
:root {
    --teal: #00b4d8;
    --teal-dark: #0096b7;
    --teal-light: #48cae4;
    --teal-tint: rgba(0, 180, 216, 0.08);
    --teal-line: rgba(0, 180, 216, 0.25);
    --purple: #7b2cbf;
    --purple-dark: #5a189a;
    --purple-tint: rgba(123, 44, 191, 0.08);
    --gold: #e6a800;
    --gold-dark: #c48f00;
    --gold-light: #ffc93c;
    --gold-tint: rgba(230, 168, 0, 0.12);
    --success: #28a745;
    --error: #dc3545;
    --ink: #1a1a2e;
    --ink-2: #5a5f72;
    --ink-3: #8a8f9f;
    --bg: #ffffff;
    --bg-2: #f5f6f8;
    --line: #e5e7eb;
    --gradient: linear-gradient(135deg, var(--teal), var(--purple));
    --gradient-gold: linear-gradient(135deg, var(--gold-light), var(--gold));
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(26, 26, 46, 0.04), 0 6px 20px rgba(26, 26, 46, 0.06);
    --shadow-lg: 0 20px 50px rgba(26, 26, 46, 0.18);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg-2);
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Text helpers ---------- */
.muted { color: var(--ink-2); }
.tiny { font-size: 0.8rem; }
.center { text-align: center; }
.eyebrow {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--teal-dark); margin-bottom: 4px;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-weight: 700; font-size: 0.95rem;
    padding: 11px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(0, 150, 183, 0.25); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(0, 150, 183, 0.35); }
.btn-ghost { background: var(--teal-tint); color: var(--teal-dark); border-color: var(--teal-line); }
.btn-ghost:hover { background: rgba(0, 180, 216, 0.14); }
.btn-start { background: var(--gradient-gold); color: var(--ink); box-shadow: 0 6px 18px rgba(230, 168, 0, 0.35); font-weight: 800; letter-spacing: 0.02em; }
.btn-end { background: #fff; color: var(--error); border-color: rgba(220, 53, 69, 0.35); }
.btn-end:hover { background: rgba(220, 53, 69, 0.06); }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Inputs ---------- */
.input {
    width: 100%; font: inherit; font-size: 1rem;
    padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--ink);
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15); }
.label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.help { display: block; font-size: 0.8rem; color: var(--ink-3); margin-top: 6px; }

/* ---------- Pills ---------- */
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em;
    padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.pill-teal { background: var(--teal-tint); color: var(--teal-dark); border: 1px solid var(--teal-line); }
.pill-gold { background: var(--gold-tint); color: var(--gold-dark); border: 1px solid rgba(230, 168, 0, 0.35); }
.pill-live { background: rgba(40, 167, 69, 0.1); color: var(--success); border: 1px solid rgba(40, 167, 69, 0.3); }
.pill-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 1.4s infinite; }
.pill-ended { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.92rem; margin: 12px 0; }
.alert-error { background: rgba(220, 53, 69, 0.08); color: var(--error); border: 1px solid rgba(220, 53, 69, 0.25); }
.alert-gold { background: var(--gold-tint); color: #7a5a00; border: 1px solid rgba(230, 168, 0, 0.35); }

/* ---------- Modal ---------- */
.modal {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(26, 26, 46, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    animation: fadeIn 0.15s ease;
}
.modal-box {
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px; padding: 24px; text-align: left;
    animation: popIn 0.18s ease;
}
.modal-box h3 { font-size: 1.25rem; margin-bottom: 8px; }
.modal-box p { margin: 6px 0; }
.modal-icon { font-size: 2.2rem; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- "or" divider ---------- */
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 0.8rem; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
