body {
    background: #000;
    overflow: hidden;
    height: 100vh;
    user-select: none;
}

#vanta-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

#hint {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.2);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ── Rias / "echo" theme ─────────────────────────────────────────── */
:root {
    --accent:     #b0b0b0;
    --accent-dk:  #4a4a4a;
    --grad:       linear-gradient(90deg, #b0b0b0, #4a4a4a);
    --grad-soft:  linear-gradient(90deg, rgba(176,176,176,.45), rgba(74,74,74,.45));
    --grad-text:  linear-gradient(90deg, #e0e0e0, #b0b0b0);
    --bar-bg:     rgba(40,40,40,0.92);
    --tab-idle:   rgb(60,60,60);
    --tab-sel:    rgb(90,90,90);
    --win-bg:     rgba(25,25,25,0.88);
    --outline:    rgba(0,0,0,0.55);
}

/* ── Meteor-style top nav bar ────────────────────────────────────── */
#gui-navbar {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    gap: 3px;
    padding: 4px;
    background: var(--bar-bg);
    border: 1px solid var(--outline);
    border-radius: 3px;
}

.nav-tab {
    padding: 5px 14px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.75);
    background: var(--tab-idle);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: background .12s, color .12s;
}
.nav-tab:hover { color: #fff; }
.nav-tab.selected {
    background: var(--tab-sel);
    color: #fff;
}
.nav-tab.selected::after {
    content: '';
    position: absolute;
    left: 4px; right: 4px; bottom: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ── Pages ───────────────────────────────────────────────────────── */
.page { display: none; }
.page.visible { display: block; }

/* ── Windows ─────────────────────────────────────────────────────── */
.panel {
    position: absolute;
    z-index: 10;
    width: 178px;
    background: var(--win-bg);
    border: 1px solid var(--outline);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* gradient drag header — empty bar, like the client's Window header */
.panel-header {
    height: 24px;
    background: var(--grad);
    border-bottom: 1px solid rgba(0,0,0,0.4);
    cursor: grab;
}
.panel-header:active { cursor: grabbing; }

/* category title + separator live inside the body, under the header */
.panel-title {
    padding: 8px 10px 6px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.92);
}

.panel-separator {
    height: 1px;
    margin: 0 8px 4px;
    background: rgba(255,255,255,0.14);
}

.panel-body {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255,0.35) transparent;
}

/* ── Module rows ─────────────────────────────────────────────────── */
.mod-row {
    height: 26px;
    margin: 0 8px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

/* hover highlight box, like the client's rgba(200,200,200,55) */
.mod-row:hover::before {
    content: '';
    position: absolute;
    inset: 1px -5px;
    background: rgba(200,200,200,0.18);
    pointer-events: none;
}

.mod-name {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    letter-spacing: 0.4px;
    color: #9b9b9b;
    transition: color 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mod-row:hover:not(.active) .mod-name { color: #fff; }

/* enabled = red gradient text, like drawGradientString in Rias */
.mod-row.active .mod-name {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.mod-gear {
    position: absolute;
    right: 2px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    z-index: 1;
    transition: color .12s;
}
.mod-row:hover .mod-gear { color: rgba(255,255,255,0.7); }
.mod-row.settings-open .mod-gear {
    color: var(--accent);
    animation: cogspin 2.4s linear infinite;
    display: inline-block;
}
@keyframes cogspin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Inline collapsed settings ───────────────────────────────────── */
.settings-area {
    display: none;
    margin: 0 8px 4px 15px;
    border-left: 1px solid rgba(225,225,225,0.35);
    background: rgba(0,0,0,0.35);
}
.settings-area.open { display: block; }

.setting-row {
    position: relative;
    height: 26px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.setting-fill {
    position: absolute;
    top: 3px; bottom: 3px; left: 0;
    background: var(--grad-soft);
    pointer-events: none;
    opacity: 0;
    transition: width 0.08s;
}

.setting-label {
    position: relative;
    z-index: 1;
    font-size: 0.7rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 84px;
}

.setting-value {
    position: absolute;
    right: 8px;
    z-index: 1;
    font-size: 0.67rem;
    color: rgba(255,255,255,0.55);
}

.setting-row.slider { cursor: ew-resize; }
.setting-row.bool   { cursor: pointer; }
.setting-row.enum   { cursor: pointer; }

.setting-row.bool .setting-value.on { color: var(--accent); font-weight: 700; }

/* keybind row, like KeybindComponent at the bottom of every module */
.setting-row.keybind { cursor: pointer; border-top: 1px solid rgba(255,255,255,0.06); }
.setting-row.keybind .setting-value { color: rgba(255,255,255,0.4); }
.setting-row.keybind.listening .setting-value { color: var(--accent); }

.no-settings {
    padding: 6px 8px;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.25);
    font-style: italic;
}

/* ── Profiles / HUD windows ──────────────────────────────────────── */
.wide { width: 220px; }

.profile-input {
    margin: 6px 10px;
    padding: 5px 8px;
    width: calc(100% - 20px);
    box-sizing: border-box;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.72rem;
    outline: none;
}
.profile-input:focus { border-color: var(--accent); }

.btn-row {
    display: flex;
    gap: 6px;
    margin: 0 10px 8px;
}
.gui-btn {
    flex: 1;
    padding: 5px 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
    background: var(--tab-idle);
    border: 1px solid rgba(0,0,0,0.4);
    border-radius: 2px;
    cursor: pointer;
    transition: background .12s;
}
.gui-btn:hover { background: var(--tab-sel); }

.profile-item {
    display: flex;
    align-items: center;
    height: 24px;
    margin: 0 8px;
    padding: 0 4px;
    font-size: 0.72rem;
    color: #cfcfcf;
    cursor: pointer;
}
.profile-item:hover { background: rgba(200,200,200,0.12); }
.profile-item.current .p-name {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}
.profile-item .p-del {
    margin-left: auto;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    padding: 0 4px;
}
.profile-item .p-del:hover { color: var(--accent); }

/* ── Tooltip ─────────────────────────────────────────────────────── */
#tooltip {
    position: fixed;
    z-index: 999;
    background: rgba(25,25,25);
    border: 1px solid rgba(225,225,225,0.4);
    padding: 5px 10px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    border-radius: 3px;
    pointer-events: none;
    max-width: 220px;
    line-height: 1.4;
    display: none;
}
