.menu-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 85px 20px 20px 200px;
    box-sizing: border-box;
}

.menu-hero {
    text-align: center;
    margin-bottom: 24px;
    animation: subpageFadeIn 0.6s ease-out both;
}

.menu-tag {
    font-family: Poppins, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: rgba(180, 140, 255, 0.7);
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.menu-heading {
    font-family: Kanit, sans-serif;
    font-size: clamp(38px, 6vw, 70px);
    font-weight: 700;
    margin: 0 0 6px 0;
    background: linear-gradient(90deg, #fff 0, #d0b0ff 40%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.35));
}

.menu-sub {
    font-family: Poppins, Arial, sans-serif;
    font-size: 15px;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

.imgui-window {
    width: 920px;
    max-width: calc(100vw - 40px);
    height: 560px;
    background: rgba(8, 8, 12, 0.97);
    border-radius: 12px;
    border: 1px solid rgba(140, 90, 255, 0.22);
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(140,90,255,0.08),
        0 30px 80px rgba(0,0,0,0.7),
        0 0 60px rgba(100,50,220,0.12);
    animation: subpageFadeIn 0.7s ease-out 0.2s both;
    user-select: none;
}

/* Animowany border glow */
.imgui-window::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid rgba(140, 90, 255, 0.0);
    animation: glowPulseMenu 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 100;
}

@keyframes glowPulseMenu {
    0%, 100% { border-color: rgba(140, 90, 255, 0.10); box-shadow: inset 0 0 0px rgba(140,90,255,0); }
    50%       { border-color: rgba(140, 90, 255, 0.35); box-shadow: inset 0 0 20px rgba(140,90,255,0.04); }
}

#matrix-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    pointer-events: none;
    z-index: 100;
}

#esp-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

.imgui-sidebar {
    width: 60px;
    min-width: 60px;
    background: rgba(8, 8, 12, 0.98);
    border-right: 1px solid rgba(140, 90, 255, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 10;
    transition: width 0.22s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    flex-shrink: 0;
}

.imgui-sidebar:hover {
    width: 180px;
}

.imgui-sidebar:hover .tab-label {
    opacity: 1;
    transform: translateX(0);
    max-width: 120px;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin: 18px auto 8px;
    filter: drop-shadow(0 0 8px rgba(140, 90, 255, 0.4));
    display: block;
    flex-shrink: 0;
    transition: width 0.22s, height 0.22s, margin 0.22s;
}

.imgui-sidebar:hover .sidebar-logo {
    width: 80px;
    height: 80px;
    margin: 14px auto 10px;
}

.sidebar-logo-text {
    font-family: Kanit, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: rgba(200,170,255,0.85);
    text-align: center;
    display: none;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
}

.sidebar-sep {
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(140,90,255,0.3), transparent);
    margin: 6px auto 10px;
    flex-shrink: 0;
}

.sidebar-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    flex: 1;
}

.sidebar-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    min-height: 40px;
}

.sidebar-tab:hover {
    background: rgba(140, 90, 255, 0.10);
}

.sidebar-tab.active {
    background: rgba(140, 90, 255, 0.18);
    box-shadow: inset 2px 0 0 rgba(140, 90, 255, 0.7);
}

.sidebar-tab.active .tab-icon {
    color: rgba(200, 170, 255, 1);
}

.tab-icon {
    font-size: 15px;
    color: rgba(180, 160, 220, 0.65);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.18s;
}

.tab-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(210, 200, 230, 0.85);
    letter-spacing: 0.03em;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transform: translateX(-6px);
    transition: opacity 0.22s 0.06s, transform 0.22s 0.06s, max-width 0.22s;
    white-space: nowrap;
}

.sidebar-profile {
    margin: auto 0 14px 0;
    padding: 0 15px; /* 15px + 30px avatar + 15px = exactly 60px */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(14, 12, 22, 1);
    border: 1.2px solid rgba(140, 90, 255, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Poppins, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(230, 225, 240, 1);
    flex-shrink: 0;
}

.sidebar-username {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    color: rgba(210, 205, 220, 0.85);
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    margin-left: 0; /* No gap when collapsed */
    transition: opacity 0.22s 0.06s, max-width 0.22s, margin-left 0.22s;
}

.imgui-sidebar:hover .sidebar-username {
    opacity: 1;
    max-width: 100px;
    margin-left: 10px; /* Add gap when expanded */
}

.imgui-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 12, 0.98);
    position: relative;
    z-index: 5;
    overflow: hidden;
    min-width: 0;
}

/* Sub-tab pill strip */
.subtab-bar {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(140,90,255,0.08);
}

.subtab-pill {
    padding: 6px 18px;
    border-radius: 20px;
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(180, 160, 220, 0.6);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.subtab-pill:hover {
    background: rgba(140, 90, 255, 0.10);
    color: rgba(200, 180, 240, 0.9);
}

.subtab-pill.active {
    background: rgba(140, 90, 255, 0.22);
    color: rgba(220, 200, 255, 1);
    box-shadow: 0 0 12px rgba(140,90,255,0.2);
}

/* Page body */
.page-body {
    flex: 1;
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    overflow: hidden;
    animation: contentFadeIn 0.25s ease-out both;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Panel (CustomChild) */
.panel {
    flex: 1;
    background: rgba(8, 8, 12, 0.97);
    border: 1px solid rgba(140, 90, 255, 0.18);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.panel-title {
    font-family: Poppins, Arial, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(180, 140, 255, 0.55);
    text-transform: uppercase;
    padding: 8px 14px 6px;
    border-bottom: 1px solid rgba(140, 90, 255, 0.12);
    flex-shrink: 0;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100,60,180,0.4) transparent;
}

.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(100,60,180,0.4); border-radius: 3px; }

.gui-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-family: Poppins, Arial, sans-serif;
    font-size: 12.5px;
    color: rgba(210, 210, 225, 0.85);
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
}
.gui-row:hover {
    color: rgba(230, 220, 255, 1);
}

.gui-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(140, 90, 255, 0.45);
    background: rgba(7, 6, 10, 1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.gui-checkbox.checked {
    background: rgba(140, 90, 255, 0.22);
    border-color: rgba(180, 130, 255, 0.8);
}
.gui-checkbox.checked::after {
    content: '';
    width: 8px;
    height: 6px;
    border-left: 2px solid rgba(165, 100, 255, 1);
    border-bottom: 2px solid rgba(165, 100, 255, 1);
    transform: rotate(-45deg) translateY(-1px);
}

.gui-slider-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}
.gui-slider-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    color: rgba(210, 210, 225, 0.8);
}
.gui-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 4px;
    background: rgba(40, 30, 60, 1);
    border: 1px solid rgba(80, 50, 130, 0.5);
    outline: none;
    cursor: pointer;
    width: 100%;
}
.gui-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(140, 90, 255, 1);
    box-shadow: 0 0 6px rgba(140, 90, 255, 0.6);
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.gui-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 10px rgba(140, 90, 255, 0.9);
}
.gui-slider-val {
    font-family: Poppins, Arial, sans-serif;
    font-size: 10.5px;
    color: rgba(140, 90, 255, 0.8);
    text-align: right;
}

.gui-combo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
}
.gui-combo-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    color: rgba(210, 210, 225, 0.8);
    white-space: nowrap;
}
.gui-combo {
    background: rgba(7, 6, 10, 1);
    border: 1px solid rgba(80, 50, 130, 0.55);
    border-radius: 6px;
    color: rgba(210, 200, 230, 0.85);
    font-family: Poppins, Arial, sans-serif;
    font-size: 11.5px;
    padding: 4px 8px;
    outline: none;
    cursor: pointer;
    min-width: 100px;
}
.gui-combo:focus {
    border-color: rgba(140, 90, 255, 0.7);
}

.gui-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(9, 8, 12, 1);
    border: 1px solid rgba(80, 50, 130, 0.5);
    color: rgba(210, 200, 230, 0.85);
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
    text-align: center;
    margin-top: 4px;
}
.gui-btn:hover {
    background: rgba(140, 90, 255, 0.18);
    border-color: rgba(140, 90, 255, 0.6);
    box-shadow: 0 0 10px rgba(140, 90, 255, 0.2);
}
.gui-btn:active {
    background: rgba(140, 90, 255, 0.28);
}

.gui-sep {
    height: 1px;
    background: rgba(140, 90, 255, 0.12);
    margin: 6px 0;
}

.gui-section-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(180, 140, 255, 0.7);
    text-transform: uppercase;
    margin: 2px 0 4px;
}

.gui-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}
.gui-color-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    color: rgba(210, 210, 225, 0.8);
}
.gui-color-swatch {
    width: 48px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(140, 90, 255, 0.45);
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.gui-color-swatch:hover {
    box-shadow: 0 0 8px rgba(140, 90, 255, 0.5);
}

.theme-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 0;
}
.theme-swatch {
    width: 30px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
    opacity: 0.45;
}
.theme-swatch:hover {
    opacity: 0.8;
}
.theme-swatch.selected {
    border-color: rgba(255,255,255,0.9);
    opacity: 1;
    box-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.gui-ac-bypass {
    background: rgba(90, 30, 30, 1);
    border-color: rgba(160, 60, 40, 0.7);
    color: rgba(255, 140, 50, 0.95);
    font-weight: 700;
    font-size: 12px;
}
.gui-ac-bypass:hover {
    background: rgba(128, 40, 40, 1);
    border-color: rgba(200, 80, 50, 0.9);
}

.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    animation: contentFadeIn 0.4s ease-out both;
}
.welcome-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.25;
    filter: drop-shadow(0 0 20px rgba(140,90,255,0.3));
    animation: welcomePulse 3s ease-in-out infinite;
}
@keyframes welcomePulse {
    0%,100% { opacity: 0.2; filter: drop-shadow(0 0 16px rgba(140,90,255,0.2)); }
    50%      { opacity: 0.35; filter: drop-shadow(0 0 28px rgba(140,90,255,0.45)); }
}
.welcome-text {
    font-family: Poppins, Arial, sans-serif;
    font-size: 13px;
    color: rgba(180, 160, 220, 0.35);
    letter-spacing: 0.08em;
}

.gui-keybind-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}
.gui-keybind-label {
    font-family: Poppins, Arial, sans-serif;
    font-size: 12px;
    color: rgba(210, 210, 225, 0.8);
}
.gui-keybind-box {
    background: rgba(7, 6, 10, 1);
    border: 1px solid rgba(80, 50, 130, 0.55);
    border-radius: 5px;
    padding: 3px 10px;
    font-family: Poppins, Arial, sans-serif;
    font-size: 11px;
    color: rgba(180, 140, 255, 0.85);
    min-width: 48px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}
.gui-keybind-box:hover {
    border-color: rgba(140, 90, 255, 0.7);
}

@media (max-width: 980px) {
    .menu-main {
        padding: 110px 16px 40px 120px;
    }
    .imgui-window {
        width: 100%;
        height: auto;
        min-height: 500px;
        flex-direction: column;
    }
    .imgui-sidebar {
        width: 100% !important;
        flex-direction: row;
        height: auto;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid rgba(140,90,255,0.18);
        overflow-x: auto;
    }
    .sidebar-logo { display: none; }
    .sidebar-sep { display: none; }
    .sidebar-tabs {
        flex-direction: row;
        padding: 0;
        gap: 4px;
        flex: 1;
        overflow-x: auto;
    }
    .sidebar-tab {
        flex-shrink: 0;
        min-width: auto;
        padding: 8px 14px;
    }
    .tab-label {
        opacity: 1;
        max-width: 80px;
        transform: none;
    }
    .sidebar-profile { display: none; }
    .imgui-content { min-height: 420px; }
    .page-body { flex-direction: column; height: auto; }
    .panel { min-height: 160px; }
}

@media (max-width: 768px) {
    .menu-main {
        padding: 100px 12px 40px 12px;
    }
}
