* {
    box-sizing: border-box;
    outline: none;
    user-select: none;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--sb-track);
    /* border-radius: 4px; Removed to make track square */
}

::-webkit-scrollbar-thumb {
    background: var(--sb-thumb);
    border-radius: 4px;
    border: 2px solid var(--sb-track);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sb-thumb-hover);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* HEADER */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2000;
    transition: transform 0.3s ease;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-right: 20px;
}

.menu-txt {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.2s;
}

.menu-txt:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
}

.toggle-opt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    transition: 0.2s;
}

.toggle-opt-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
}

.toggle-opt-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.toggle-opt-btn.rotated svg {
    transform: rotate(180deg);
}

/* OPTIONS BAR */
#options-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 50px;
    background: var(--header-bg);
    border-top: 1px solid var(--grid-color);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    z-index: 1900;
    box-shadow: var(--shadow);
    overflow-x: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

#options-bar.closed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* HIDE UI STATES */
body.hide-ui #app-header {
    transform: translateY(-100%);
}

body.hide-ui #options-bar {
    transform: translateY(-100%);
    opacity: 0;
}