/*
    Bryce Diep — Mode Toggles Bar
    A small bar pinned to the top-center of the screen that hosts mode toggles
    and launchers (Cat Mode, Shape Wars, …). Additive overlay — does not touch
    the stock diep client.
*/

#mode-bar {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(20, 22, 28, 0.78);
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    font-family: "Ubuntu", sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

#mode-bar .mode-bar-label {
    color: #b9c0cc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-right: 2px;
    opacity: 0.8;
}

.mode-bar-btn {
    appearance: none;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #f2f4f8;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mode-bar-btn:hover { background: rgba(255, 255, 255, 0.14); }
.mode-bar-btn:active { transform: translateY(1px); }

/* A toggle in the "on" state. */
.mode-bar-btn.is-on {
    background: linear-gradient(180deg, #ffd84d, #f5a623);
    border-color: #ffe27a;
    color: #3a2a00;
}

.mode-bar-emoji { font-size: 15px; line-height: 1; }

/* ── Shape Wars launcher popover ───────────────────────────────────── */

#shapewars-launcher {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9001;
    width: 280px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(20, 22, 28, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    color: #eef1f6;
    font-family: "Ubuntu", sans-serif;
    display: none;
}

#shapewars-launcher.open { display: block; }

#shapewars-launcher h3 {
    margin: 0 0 10px;
    font-size: 15px;
    letter-spacing: 0.03em;
}

#shapewars-launcher .sw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 13px;
}

#shapewars-launcher .sw-types { display: flex; gap: 6px; flex-wrap: wrap; }

.sw-type-chip {
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #dfe3ea;
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: capitalize;
}
.sw-type-chip.sel { background: #3a7afe; border-color: #6fa0ff; color: #fff; }

#shapewars-launcher input[type="range"] { width: 130px; }

.sw-start {
    width: 100%;
    margin-top: 10px;
    border: none;
    border-radius: 9px;
    padding: 9px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    background: linear-gradient(180deg, #ff5d6c, #e23744);
    color: #fff;
}
.sw-start:active { transform: translateY(1px); }

/* ── Shape Wars scorecard ──────────────────────────────────────────── */

#shapewars-score {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 9000;
    min-width: 150px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(20, 22, 28, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.12);
    font-family: "Ubuntu", sans-serif;
    color: #fff;
    display: none;
}
#shapewars-score.show { display: block; }

#shapewars-score .sw-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
    text-align: center;
    margin-bottom: 4px;
}
#shapewars-score .sw-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
}
#shapewars-score .sw-blue { color: #4fc3f7; }
#shapewars-score .sw-red { color: #ff6b73; }
#shapewars-score .sw-vs { font-size: 12px; opacity: 0.6; }
#shapewars-score .sw-status {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.85;
}
