/* -------------------------------------------------------------------------- */
/* Design tokens                                                              */
/* -------------------------------------------------------------------------- */

:root {
    /* Backgrounds */
    --bg-main: #2e2e2e;
    --bg-control: #404040;
    --bg-input: #505050;

    /* Panels */
    --panel-bg: rgba(40, 40, 40, 0.55);
    --panel-bg-light: rgba(255, 255, 255, 0.08);
    --panel-bg-med: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.18);
    --panel-border-light: rgba(255, 255, 255, 0.5);

    /* Text */
    --text-main: #e4e6eb;
    --text-light: #f0f0f0;
    --text-muted: #a5a5a5;
    --text-dim: #808080;

    /* Accent */
    --accent: #438ad2;
    --accent-hover: #5da9ff;
    --accent-bright: #00c8ff;

    --button-bg: #294961;
    --button-bg-hover: rgba(255, 255, 255, 0.18);
    --button-bg-active: rgba(255, 255, 255, 0.24);
    --button-border: rgba(255, 255, 255, 0.18);
    --button-border-hover: rgba(255, 255, 255, 0.25);
    --button-shadow-inner: rgba(0, 0, 0, 0.4);
    --button-shadow-inner-hover: rgba(0, 0, 0, 0.35);
    --button-shadow-inner-active: rgba(0, 0, 0, 0.5);
    --button-shadow-outer: rgba(0, 0, 0, 0.6);
    --button-shadow-outer-hover: rgba(0, 0, 0, 0.7);
    --button-shadow-outer-active: rgba(0, 0, 0, 0.8);

    /* Success */
    --success: #7fe0a6;
    --success-border: rgba(90, 160, 120, 0.9);

    /* Warning / Error */
    --warning: #e0b040;
    --error: #ff5c5c;

    /* Borders */
    --border-light: rgba(255, 255, 255, 0.12);
    --border-medium: #808080;

    --ui-font: system-ui, sans-serif;
    --mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* -------------------------------------------------------------------------- */
/* Base elements                                                              */
/* -------------------------------------------------------------------------- */

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-color: #101010;
}

input[type="number"] {
    width: 43px;
    height: 16px;
    background-color: #505050;
    border-width: 1px;
    border-color: rgb(181, 180, 180);
    padding: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="text"] {
    width: 60px;
    height: 32px;
    background-color: #505050;
    border-width: 1px;
    border-color: rgb(181, 180, 180);
    padding: 0;
    color: #e0e0e0;
    font-size: 14px;
}

select {
    border-width: 1px;
    border-color: rgb(181, 180, 180);
    color: #e0e0e0;
    background-color: #404040;
    font-size: 14px;
}

/* -------------------------------------------------------------------------- */
/* Panels and layout                                                          */
/* -------------------------------------------------------------------------- */

.left-panel {
    background: var(--panel-bg-light);
    backdrop-filter: blur(4px);
    border-width: 0px 1px 0px 0px;
    border-style: solid;
    border-color: var(--panel-border);
}
.glass-panel {
    background: var(--panel-bg-light);
    backdrop-filter: blur(4px);
    border: 1px solid var(--panel-border);
}
.float-panel {
    background: var(--panel-bg-med);
    backdrop-filter: blur(4px);
    border: 1px solid var(--panel-border);
    border-radius: 11px;
}

.solid-panel {
    background: #575757;
    border: 2px solid var(--panel-border-light);
}

.highlight-panel {
    background: #575757;
    border: 2px solid yellow;
}

.divider {
    background: black;
    cursor: ns-resize;
}
.tile {
    background: var(--panel-bg-light);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
}

/* -------------------------------------------------------------------------- */
/* Palette editor labels                                                      */
/* -------------------------------------------------------------------------- */

.lbl-panel-header {
    font-size: 14px;
    color: white;
}

.lbl-names {
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.lbl-time {
    font-size: 25px;
    color: #e0e0e0;
    font-weight: bold;
}

.obj-label {
    font-size: 13px;
    color: #e0e0e0;
}

.tiny-label {
    color: #cfd2d6; /* soft light grey text */
    font-family: system-ui, sans-serif;
    font-size: 12px;
}

.small-title {
    font-size: 15px;
    color: white;
}
.note-label {
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.resolved-chord {
    box-sizing: border-box;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.win-action-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;

    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4) inset,
        0 1px 2px rgba(0, 0, 0, 0.6);

    padding: 4px 10px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #e4e6eb;

    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.win-action-button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35) inset,
        0 1px 3px rgba(0, 0, 0, 0.7);
}

.win-action-button:active {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(2px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5) inset,
        0 1px 1px rgba(0, 0, 0, 0.8);
}

/* Mini +/- buttons for dark mode */
.editor-mini-btn {
    width: 28px;
    height: 24px;

    background: rgba(255, 255, 255, 0.12); /* translucent light surface */
    border: 1px solid #5a5a5a; /* soft medium-grey border */
    border-radius: 4px;

    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0; /* light grey text */

    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease;
}

.editor-mini-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #00a0ff; /* same accent as highlight */
    color: #ffffff;
}

.editor-mini-btn:active {
    background: rgba(255, 255, 255, 0.28);
    border-color: #0080cc;
}

.label-btn {
    background: transparent;
    font-size: 14px;
    color: #a0a0a0;
    border: none;
    text-align: left;
}

.label-btn:hover {
    font-weight: bold;
}

.label-btn:active {
    border: 1px solid #b4b4b8;
}

.icon2button {
    background: rgba(255, 255, 255, 0.1); /* soft glass panel */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    font-size: 12px;

    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;

    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.icon2button:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.25));
}

.icon2button:active {
    transform: scale(1.05) translateY(2px);
}

/* -----------------------------------------
   Icon Buttons — Frosted Micro-Tile (Dark)
   ----------------------------------------- */
.icon-button {
    background: rgba(255, 255, 255, 0.1); /* soft glass panel */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    background-repeat: no-repeat;
    background-size: 90%;

    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.icon-button:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.25));
}

.icon-button:active {
    transform: scale(1.05) translateY(2px);
}

/* -------------------------------------------------------------------------- */
/* General labels and headers                                                 */
/* -------------------------------------------------------------------------- */

.label {
    color: var(--text-main);
    font-size: 14px;
}

.label-light {
    color: white;
    font-size: 14px;
}

.label-header {
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.session-name-label {
    color: #9aa1aa;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.session-name-input {
    height: 22px !important;
    box-sizing: border-box;
    padding: 0 8px !important;
    border: 1px solid transparent !important;
    border-radius: 3px;
    background-color: #ffffff08 !important;
    color: #e4e6eb !important;
    font-size: 16px !important;
    font-weight: 600;
}

.session-name-input:focus {
    border-color: #6da7cf !important;
    background-color: #ffffff12 !important;
    outline: none;
}

.stream-name-input {
    font-size: 12px !important;
}

.header {
    color: var(--text-main);
    background-color: #3e3e3e;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* -------------------------------------------------------------------------- */
/* Standard and animated toggles                                              */
/* -------------------------------------------------------------------------- */

.std-toggle-off {
    width: 60px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 1px rgba(0, 0, 0, 0.55);
    color: #bfc3c7; /* muted cool-grey text */
    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.std-toggle-off:hover {
    transform: translateX(2px);
}

.std-toggle-off:active {
    transform: translateY(2px);
}

.std-toggle-on {
    width: 60px;
    height: 24px;

    /* Subtle vertical gradient with slightly brighter center */
    background-image: linear-gradient(to bottom, #2e3238 0%, #3a414c 42%, #2e3238 100%);
    background-color: #343840; /* fallback for older browsers */

    border: 1px solid #7aa2cf; /* muted blue-grey outline */

    /* Sharp inner highlight + light halo */
    box-shadow:
        0 0 0 1px rgba(157, 194, 242, 0.5) inset,
        0 1px 2px rgba(0, 0, 0, 0.65);

    /* Backlit text with slight halo */
    color: #d2e7ff;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.9),
        0 0 2px rgba(157, 194, 242, 0.9);

    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    user-select: none;

    transition:
        background-image 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.std-toggle-on:hover {
    transform: translateX(2px);
}

.std-toggle-on:active {
    transform: translateY(2px);
}

.anim-toggle-off {
    width: 60px;
    height: 24px;

    background: rgba(30, 32, 36, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    border: 1px solid rgba(90, 90, 90, 0.9);
    border-radius: 4px;

    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 2px rgba(0, 0, 0, 0.6);

    color: #8b9097;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    user-select: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.anim-toggle-off:hover {
    transform: translateX(2px);
}

.anim-toggle-off:active {
    transform: translateY(2px);
}

.anim-toggle-on {
    width: 60px;
    height: 24px;

    background: rgba(40, 70, 50, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    border: 1px solid rgba(90, 160, 120, 0.9);
    border-radius: 4px;

    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 1px 2px rgba(0, 0, 0, 0.6);

    /* ACTIVE TEXT — constant glow */
    color: #7fe0a6;
    text-shadow:
        0 0 1px rgba(100, 220, 160, 0.65),
        0 0 4px rgba(100, 220, 160, 0.35);

    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    user-select: none;
}

.anim-toggle-on:hover {
    transform: translateX(2px);
}

.anim-toggle-on:active {
    transform: translateY(2px);
}

/* -------------------------------------------------------------------------- */
/* Editor navigation toggles                                                  */
/* -------------------------------------------------------------------------- */

.top-toggle-off {
    background: #3a3f47;
    color: #9fa8b6;

    width: 120px;
    height: 26px;

    border: 1px solid #505862;
    border-top: none;
    border-radius: 0 0 12px 12px;

    font-size: 15px;
    font-weight: 600;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.top-toggle-off:hover {
    background: #464d57;
    color: #eef6ff;
    border-color: #6b8fb5;
}

.top-toggle-on {
    background: linear-gradient(to bottom, #5b84aa, #416482);
    color: #eef6ff;

    width: 120px;
    height: 30px;

    border: 1px solid #8fb8df;
    border-top: none;
    border-radius: 0 0 12px 12px;

    font-size: 15px;
    font-weight: 700;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 2px 5px rgba(0, 0, 0, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Palette mode toggle                                                        */
/* -------------------------------------------------------------------------- */

.mode-toggle {
    position: relative;
    width: 110px;
    height: 26px;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset;
}

.mode-toggle-option {
    width: 55px;
    height: 100%;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    color: #bfc3c7;

    transition: color 0.15s ease;
}

.mode-toggle-option:hover {
    color: #ffffff;
}

.mode-toggle-thumb {
    position: absolute;
    top: 0;
    left: 0;

    width: 55px;
    height: 26px;

    background: rgba(255, 255, 255, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 6px;
    z-index: 1;

    transition: left 0.18s ease;
}
.signal-control {
    border: 1px solid #808080;
    border-radius: 3x;
}
.control-bar-logo {
    box-sizing: border-box;
    background-color: #23272d;
    object-fit: contain;
    object-position: center;
    padding: 4px 6px;
    pointer-events: none;
}
