body, html { height: 100%; margin: 0; padding: 0; background-color: #000; overflow: hidden; }

    #universe-container {
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh;
        z-index: 1; overflow: hidden;
        background-color: #000;
        transition: opacity 1.5s ease;
    }
    .audio-disabled {
        pointer-events: none !important;
        opacity: 0.2 !important;
        cursor: default !important;
    }
.atmosphere-halo {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("../only earth.png"); 
    background-size: cover;
    background-position: center;
    z-index: 4;
    opacity: 0;
    filter: brightness(2) contrast(1.5) saturate(2.5) blur(10px);
    mix-blend-mode: screen;
    pointer-events: none;
}

    .animate-halo { animation: haloPulse 8s ease-in-out infinite !important; }
    @keyframes haloPulse {
        0%, 100% { opacity: 0.3; filter: brightness(1.2) blur(5px); }
        50% { opacity: 0.8; filter: brightness(2) blur(8px); }
    }

.galaxy-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("../galaxy.png");
    background-size: cover;
    background-repeat: repeat-x;
    z-index: 1;
    opacity: 0.5;

    -webkit-mask-image: radial-gradient(
        circle at 50% 50%, 
        black 20%, 
        rgba(0,0,0,0.8) 50%, 
        transparent 95%
    );
    mask-image: radial-gradient(
        circle at 50% 50%, 
        black 20%, 
        rgba(0,0,0,0.8) 50%, 
        transparent 95%
    );
}

    .earth-layer, .lights-overlay {
        position: absolute; top: 0; left: 0;
        width: 100%; height: 100%;
        background-image: url("../only earth.png");
        background-size: cover; background-position: center;
    }

    .earth-layer { z-index: 2; }
    .lights-overlay {
        z-index: 3; opacity: 0;
        filter: brightness(2.5) contrast(1.5);
        mix-blend-mode: screen;
    }
    
    #earth-base, #earth-halo, #city-lights {
        transition: opacity 1.5s ease;
    }

    .animate-galaxy { animation: galaxyScroll 200s linear infinite !important; }
    @keyframes galaxyScroll {
        from { background-position: 0 0; }
        to { background-position: -4000px 0; }
    }

    .animate-cities {
        animation: cityFlicker 10s ease-in-out infinite !important;
        -webkit-mask-image: radial-gradient(circle, black 40%, transparent 80%);
        mask-image: radial-gradient(circle, black 40%, transparent 80%);
        mask-size: 300% 300%;
        opacity: 0.8 !important;
    }

    @keyframes cityFlicker {
        0% { mask-position: 0% 0%; }
        50% { mask-position: 100% 50%; }
        100% { mask-position: 0% 0%; }
    }

    .planet-hidden {
        opacity: 0 !important;
        transition: opacity 1.5s ease !important;
    }

    .overlay {
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        z-index: 5;
        transition: backdrop-filter 1.5s ease, background 1.5s ease;
    }

    #photo-field {
        position: fixed;
        top: 15px; left: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        z-index: 50;
        visibility: hidden; display: block;
        opacity: 0; 
        transition: opacity 2s ease;
        box-sizing: border-box;
        overflow: hidden;
        pointer-events: auto;
    }
    
    #photo-canvas {
        width: 100%;
        height: 100%;
        display: block;
        cursor: default;
    }
    
    body.ruler-active #photo-field {
        top: 17px !important;
        left: 17px !important;
        width: calc(100vw - 27px) !important;
        height: calc(100vh - 22px) !important;
    }

    #static-bg {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        background-image: url("../earth.png");
        background-size: cover; background-position: center;
        z-index: 0; display: none;
        transition: opacity 1.5s ease;
    }

    #cosmic-bg {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        background-image: url("../cosmic.png");
        background-size: cover; background-position: center;
        z-index: 0; display: none; opacity: 0;
        transition: opacity 1.5s ease;
    }

    #constellation-bg {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        background-image: url("../konstelacja.png");
        background-size: cover; background-position: center;
        z-index: 0; display: none; opacity: 0;
        transition: opacity 1.5s ease;
    }

    @keyframes constScroll {
        from { background-position: 0 0, 1250px 0, 0 0; }
        to { background-position: 2500px 0, 3750px 0, 500px 0; }
    }

    #gl-canvas {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        z-index: 0; display: none; opacity: 0;
        transition: opacity 1.5s ease;
        pointer-events: none;
    }

    #bottom-zone {
        position: fixed; bottom: 0; left: 0;
        width: 100vw; height: 60px;
        z-index: 200;
        pointer-events: none;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        padding-bottom: 5px;
        padding-right: 8px;
        padding-left: 0; 
        box-sizing: border-box;
        gap: 5px;
    }

    #tablet-wrapper {
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh;
        z-index: 100;
        pointer-events: none;
        clip-path: inset(0 0 60px 0);
    }

    .tablet {
        position: absolute; top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px; padding: 25px;
        width: 375px; text-align: center;
        height: 175px;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        box-sizing: border-box;
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        color: white; font-family: 'Segoe UI', sans-serif;
        pointer-events: auto;
    }

    .tablet.expanded {
        width: 220px;
        height: 500px;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(15px);
        padding: 10px 10px 10px 10px;
        display: flex; 
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start !important;
        transform-origin: top right;
        
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        z-index: 100;
    }

    .tablet.expanded-final {
        top: 15px !important; 
        right: 10px !important; 
        left: auto !important; 
        bottom: auto !important;
        transform: none !important;
    }

    .tablet.shrink-1 {
        height: 475px !important;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .tablet.shrink-2 {
        height: 450px !important;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .tablet.expanded.wide-mode {
        width: calc(100vw - 20px) !important; 
        height: calc(100vh - 80px) !important;
        
        right: 10px !important; 
        left: auto !important; 
        position: absolute !important;
        display: flex !important;
        flex-direction: row-reverse !important; 
        align-items: stretch !important;
        padding: 20px;
        box-sizing: border-box;
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(0, 0, 0, 0.9);
    }

    .tablet.expanded.wide-mode #main-menu,
    .tablet.closing-wide #main-menu {
        width: 220px !important;
        flex: 0 0 220px !important;
    }

    .tablet.expanded .version-text {
        display: none;
    }

    .tablet.closing-wide {
        flex-direction: row-reverse !important;
        width: 220px !important;
        height: 500px !important;
        padding: 10px 10px 10px 10px !important;
        
        right: 10px !important; 
        left: auto !important; 
        
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        background: rgba(0, 0, 0, 0.9);
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .omni-sep {
        height: 1px;
        width: 80%;
        margin: 5px auto;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.6), transparent);
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 1;
    }
    
    .omni-sep-sub {
        height: 1px;
        width: 80%;
        margin: 5px auto 5px auto;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.6), transparent);
    }
    
    .omni-sep-subtle {
        height: 1px;
        width: 40%;
        margin: 12px -5px 12px auto;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.45), transparent);
    }

    .tablet.wide-mode .omni-sep,
    .tablet.closing-wide .omni-sep {
        opacity: 0;
    }

    .separator {
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.2), transparent);
        margin: 5px 15px;
        transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

#main-menu {
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: right;
    width: 100%;
}

.main-nav {
    margin: 0 !important;
    padding: 0 !important;
}

.nav-item:first-child {
    margin-top: 0 !important;
    padding-top: 5px;
}
    .welcome-text { font-size: 1.5rem; margin: 0; font-weight: 300; letter-spacing: 4px; text-transform: uppercase; }
    .system-name { font-family: 'Consolas', monospace; font-size: 0.85rem; letter-spacing: 2px; color: rgba(255, 255, 255, 0.7); }
    .access-btn { margin-top: 0; padding: 8px 20px; border: 1px solid white; color: white; background: transparent; cursor: pointer; font-family: 'Consolas', monospace; letter-spacing: 2px; text-transform: uppercase; transition: 0.3s; font-size: 0.7rem; }
    .access-btn:hover { background: white; color: black; }
    .progress-container { width: calc(100% + 30px); height: 4px; background: rgba(255, 255, 255, 0.1); margin-top: 5px; margin-left: -15px; margin-right: -15px; }
    .progress-bar { width: 0%; height: 100%; background: white; transition: width 2s linear; }
    .hide { display: none !important; }

    .seq-top-wrapper {
        height: 40px;
        display: flex; align-items: center; justify-content: center;
        width: 100%;
    }
    
    .bottom-icon {
        height: 25px;
        width: auto;
        cursor: pointer;
        pointer-events: auto;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 1.5;
        filter: none;
        margin-left: 0;
    }
    
    #btn-group, #btn-search, #btn-ruler {
        filter: drop-shadow(0 0 25px #000) contrast(2.5) brightness(1.6) opacity(1);
    }
    
    #btn-group {
        height: 25px;
    }

    #btn-settings { margin-left: 20px; }

    #btn-profile {
        height: 50px; 
        margin-right: 0; 
        margin-left: 0;
        filter: none;
        opacity: 1;
        margin-bottom: 0; 
    }
    #btn-profile:hover { transform: scale(1.1); filter: drop-shadow(0 0 5px #000); }

    #btn-audio[src*="off.png"] {
        margin-top: 4px; 
    }

    .bottom-icon:hover { transform: scale(1.1); filter: drop-shadow(0 0 5px #000); }

    .active-tool {
        filter: drop-shadow(0 0 15px #00bfff) contrast(1.5) brightness(1.5) !important;
        opacity: 1 !important;
    }

    #profile-modal {
        position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 600px;
        height: 65vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        z-index: 300;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 10vh;
        box-sizing: border-box;
        color: white;
        overflow: hidden;
    }

#profile-photo-wrapper {
    position: relative;
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#profile-photo-area {
    width: 100%;
    padding-top: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Segoe UI', sans-serif;
}

#profile-image-display {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1);
    object-fit: cover;
    cursor: default;
    transition: transform 0.3s ease;
}

#profile-photo-placeholder {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    text-align: center;
    width: 100%;
}

#profile-add-photo-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0, 191, 255, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1;
    transition: background 0.3s;
}
#profile-add-photo-btn:hover { background: #00bfff; }

.profile-photo-actions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 10px;
}
.profile-photo-actions button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.8);
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.profile-photo-actions button:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: white;
}

#profile-restore-photo-btn {
    position: absolute;
    bottom: 10px;
    right: 50px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 1;
    transition: background 0.3s;
    padding: 0;
}

#profile-restore-photo-btn:hover { background: rgba(255, 255, 255, 0.3); }

#profile-view-selector {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    z-index: 5;
}
.view-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-family: 'Segoe UI', sans-serif;
}
.view-icon:hover { background: rgba(255,255,255,0.2); }
.view-icon.active {
    background: rgba(0, 191, 255, 0.3);
    border-color: rgba(0, 191, 255, 0.8);
    transform: translateY(-8px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.2);
}

    .close-x {
        position: absolute; top: 15px; right: 20px;
        font-family: 'Segoe UI', sans-serif; font-size: 1.5rem;
        cursor: pointer; color: rgba(255,255,255,0.7);
    }
    .close-x:hover { color: white; }

    .ruler-overlay {
        position: fixed; z-index: 250;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(15px);
        pointer-events: none;
        overflow: hidden;
        font-family: 'Consolas', monospace;
        color: #00bfff;
        font-size: 0.7rem;
    }
    #ruler-h {
        top: 0; left: 0; width: calc(100vw - 227px); height: 15px;
    }
    #ruler-v {
        top: 0; left: 0; width: 15px; height: calc(100vh - 5px);
    }
    
    #ruler-h-track, #ruler-v-track {
        display: grid;
        will-change: transform;
        gap: 20px;
    }
    
    .ruler-item-h {
        border-right: 1px solid rgba(0, 191, 255, 0.3);
        display: flex; align-items: center; justify-content: center;
    }
    .ruler-item-v {
        border-bottom: 1px solid rgba(0, 191, 255, 0.3);
        display: flex; align-items: center; justify-content: center;
        writing-mode: vertical-rl;
    }

    #ruler-corner {
        top: 0; left: 0;
        width: 15px; height: 15px;
        z-index: 251;
        display: flex; align-items: center; justify-content: center;
        border-right: 1px solid rgba(0, 191, 255, 0.3);
        border-bottom: 1px solid rgba(0, 191, 255, 0.3);
        box-sizing: border-box;
    }

    #search-modal {
        position: fixed; top: 10px; left: 10px;
        width: 170px;
        height: auto; min-height: 80px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
        border-radius: 15px;
        z-index: 300;
        padding: 8px; box-sizing: border-box;
        color: white; font-family: 'Consolas', monospace;
        transition: top 0.3s ease;
    }
    body.ruler-active #search-modal { top: 25px !important; left: 25px !important; }

    .search-top { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 5px; }
    .search-icon-btn { 
        cursor: pointer; opacity: 0.7; font-size: 1rem; 
        width: 20px; height: 20px; display: flex; justify-content: center; align-items: center;
    }
    .search-icon-btn:hover { opacity: 1; }
    
    .search-bottom { display: flex; align-items: center; padding-top: 5px; }
    .search-label { margin-right: 10px; font-size: 0.9rem; color: #00bfff; }
    .search-input {
        background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.3);
        color: white; width: 80px; font-family: 'Consolas', monospace; text-align: center;
        outline: none;
    }
    .search-sep {
        height: 1px; width: 100%;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.6), transparent);
        margin-bottom: 5px;
    }

    #population-widget {
        position: fixed; bottom: 6px; left: 17px;
        width: auto; height: 25px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(15px);
        border: 1px solid #00bfff;
        border-radius: 15px;
        padding: 0 15px;
        justify-content: center;
        color: #00bfff;
        font-family: 'Consolas', monospace;
        font-size: 0.7rem;
        cursor: pointer;
        z-index: 200;
        transition: opacity 2s ease, background 0.3s ease, box-shadow 0.3s ease;
        opacity: 1;
        display: flex; align-items: center; gap: 5px;
    }
    #population-widget:hover { background: rgba(0, 191, 255, 0.1); box-shadow: 0 0 10px rgba(0, 191, 255, 0.3); }
    
    #population-widget.audio-disabled { opacity: 0.5 !important; }
    
    #population-modal {
        position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 210px; min-height: 150px;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        z-index: 300;
        padding: 10px; box-sizing: border-box;
        color: white; font-family: 'Consolas', monospace;
        text-align: center; display: flex; flex-direction: column; gap: 15px; align-items: center; justify-content: center;
    }
    #population-modal .close-x {
        top: 0px; right: 5px;
    }

    #view-mode-widget {
        position: fixed;
        top: 520px;
        right: 17px;
        width: auto; height: 25px;
        background: transparent;
        box-sizing: border-box;
        border: none;
        border-radius: 15px;
        padding: 0 15px;
        justify-content: center;
        color: #00bfff;
        font-family: 'Consolas', monospace;
        font-size: 0.7rem;
        cursor: pointer;
        z-index: 90;
        transition: transform 0.3s ease, opacity 2s ease, box-shadow 0.3s ease, border-radius 0.3s ease, top 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex; align-items: center; gap: 5px;
        overflow: visible;
        user-select: none;
    }
    #view-mode-widget::before {
        content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(15px);
        border: 1px solid #00bfff;
        border-radius: 15px;
        box-sizing: border-box;
        z-index: -1;
        transition: border-radius 0.3s ease, background-color 0.3s ease;
    }
    #view-mode-widget.wide-active {
        opacity: 0 !important;
        pointer-events: none !important;
    }
    #view-mode-widget.merge-top::before {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top-color: transparent;
    }
    #view-mode-widget.merge-bottom::before {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom-color: transparent;
    }
    #view-mode-widget:not(.selecting):hover::before { background: rgba(0, 191, 255, 0.1); }
    #view-mode-widget.audio-disabled { opacity: 0.5 !important; }

    .view-mode-option {
        position: absolute;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        border: 1px solid #00bfff;
        border-radius: 0;
        box-sizing: border-box;
        display: flex; justify-content: center; align-items: center;
        color: #00bfff; font-family: 'Consolas', monospace; font-size: 0.7rem;
        z-index: 190;
        box-shadow: none;
        transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, background-color 0.2s ease, color 0.2s ease;
    }
    .view-mode-option.hovered { background: rgba(0, 191, 255, 0.2); color: white; }
    
    .opt-top-cap { border-radius: 15px 15px 0 0; }
    .opt-bottom-cap { border-radius: 0 0 15px 15px; }
    .opt-no-top-border { border-top: none; }
    .opt-no-bottom-border { border-bottom: none; }

    #photo-modal {
        position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 600px; height: 65vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        z-index: 300;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        color: white;
    }
    .modal-controls {
        position: absolute; top: 15px; right: 20px;
        display: flex; gap: 15px;
        font-family: 'Segoe UI', sans-serif; font-size: 1.5rem;
    }
    .control-item { cursor: pointer; color: rgba(255,255,255,0.7); transition: color 0.3s; }
    .control-item:hover { color: white; }
    
    #photo-display-area {
        width: 80%; height: 70%;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        border: 1px dashed rgba(255,255,255,0.2); border-radius: 10px;
    }
    #photo-display-img {
        max-width: 100%; max-height: 80%; object-fit: contain;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
    }
    #photo-display-id {
        margin-top: 15px; font-family: 'Consolas', monospace; font-size: 1.2rem; color: #00bfff;
    }

    .separator {
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(0, 191, 255, 0.2), transparent);
        margin: 5px 15px;
    }

    .nav-item, .sub-item {
        padding: 12px 10px;
        font-size: 0.75rem;
        color: #fff;
        cursor: pointer;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0.8;
        white-space: nowrap;
        border-radius: 10px 0 0 10px;
    }

    .nav-item:hover, .sub-item:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.05);
        padding-left: 25px;
    }
.v-separator {
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(0, 133, 179, 0.7), transparent);
    height: auto;
    align-self: stretch;
    margin: 0 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: block !important;
}

.tablet.wide-mode .v-separator,
.tablet.closing-wide .v-separator {
    opacity: 1;
}
div#lower-menu {
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 2s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sub-menu {
    max-height: 0;
    overflow: hidden;
    background: transparent !important;
    backdrop-filter: none !important;
    transition: max-height 2s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: none;
    margin: 0 !important;
    border: none !important;
}
    .sub-menu::-webkit-scrollbar { display: none; }

.sub-item {
    padding: 7.5px 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}
.menu-fade-out {
    opacity: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none;
}
.sub-item:hover {
    color: #00bfff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 25px;
}

.sub-menu.show {
    max-height: 500px;
    border: none !important;
    margin-top: -15px !important;
}

#settings-menu {
    width: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: right;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: none;
}

.tablet.wide-mode.settings-active #settings-menu {
    width: 133px;
    opacity: 1;
}

#settings-sep {
    width: 0;
    margin: 0;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tablet.wide-mode.settings-active #settings-sep {
    width: 2px;
    margin: 0 20px;
    opacity: 1;
}

#wide-content {
    flex: 1;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    padding: 20px;
    overflow-y: auto;
}
.tablet.wide-mode #wide-content {
    opacity: 1;
}

#transparency-menu {
    width: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: right;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: none;
}

.tablet.wide-mode.transparency-active #transparency-menu {
    width: 133px;
    opacity: 1;
}

#transparency-sep {
    width: 0;
    margin: 0;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tablet.wide-mode.transparency-active #transparency-sep {
    width: 2px;
    margin: 0 20px;
    opacity: 1;
}

    #star-dimmer {
        position: fixed; top: 0; left: 0;
        width: 100vw; height: 100vh;
        background-color: #000;
        z-index: 40;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.5s ease;
    }
    
    #spam-overlay {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.85);
        z-index: 9000;
        display: none; opacity: 0;
        transition: background 0.5s ease, opacity 0.5s ease;
        justify-content: center; align-items: center;
    }
    #spam-modal {
        width: 400px; height: 250px;
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        position: relative;
        display: flex; flex-direction: column;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
        overflow: hidden;
        z-index: 9002;
        transition: box-shadow 0.3s ease, border-color 0.3s ease, border-width 0.1s ease;
    }
    .spam-title-bar {
        width: 100%; height: 25px;
        background: rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex; align-items: center;
        padding-left: 10px;
        font-family: 'Segoe UI', sans-serif; font-size: 0.7rem; color: rgba(255, 255, 255, 0.7);
        letter-spacing: 1px;
    }
    .spam-content {
        flex: 1; display: flex; flex-direction: column;
        justify-content: center; align-items: center;
        padding: 20px; text-align: center;
    }
    .spam-text {
        font-size: 1.1rem; font-weight: 300; letter-spacing: 2px; text-transform: uppercase;
        color: white; margin-bottom: 20px;
    }
    .spam-buttons {
        display: flex; gap: 15px; width: 100%; 
        justify-content: flex-start;
        padding-left: 40px;
        box-sizing: border-box;
    }
    .spam-btn {
        padding: 8px 20px; border: 1px solid white; color: white; background: transparent;
        cursor: pointer; font-family: 'Consolas', monospace; font-size: 0.7rem;
        text-transform: uppercase; transition: all 0.2s;
        white-space: nowrap;
    }
    .spam-btn:hover { background: white; color: black; }
    .spam-btn.disabled { opacity: 0.3; pointer-events: none; border-color: #555; color: #aaa; }

    #spam-canvas {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        z-index: 9001;
        pointer-events: none;
    }
    #spam-canvas.active { pointer-events: auto; cursor: crosshair; }

    #spam-btn-unlock {
        width: 130px; flex-shrink: 0;
    }
    #spam-btn-fun {
        width: auto; min-width: 120px; max-width: 190px;
        overflow: hidden;
        transition: all 0.1s ease;
        white-space: normal;
        line-height: 1.1;
        height: auto;
        min-height: 33px;
    }

    .spam-stats {
        position: absolute; bottom: 10px; right: 10px;
        text-align: right; font-family: 'Consolas', monospace; font-size: 0.7rem; color: #00bfff;
        pointer-events: none;
    }
    
    #spam-leaderboard {
        position: absolute; top: 50%; right: -320px;
        transform: translateY(-50%);
        width: 350px; height: 400px;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid #00bfff;
        border-radius: 10px;
        display: flex; flex-direction: column;
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s ease, opacity 0.5s ease;
        z-index: 9002;
        opacity: 0;
    }
    #spam-leaderboard.show { right: 50px; opacity: 1; }
    .lb-header {
        padding: 10px; border-bottom: 1px solid rgba(0, 191, 255, 0.3);
        text-align: center; font-family: 'Consolas', monospace; color: #00bfff;
        font-weight: bold;
    }
    .lb-content {
        flex: 1; overflow-y: auto; padding: 10px;
        font-family: 'Consolas', monospace; font-size: 0.7rem; color: white;
    }
    .lb-content::-webkit-scrollbar { width: 5px; }
    .lb-content::-webkit-scrollbar-thumb { background: #00bfff; border-radius: 5px; }
    .lb-row {
        display: flex; justify-content: space-between; margin-bottom: 5px;
        padding: 5px; border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 0.65rem;
    }
    .lb-rank { width: 25px; color: #aaa; }
    .lb-nick { width: 80px; text-align: left; overflow: hidden; text-overflow: ellipsis; }
    .lb-id { width: 50px; text-align: center; color: #888; }
    .lb-cps { width: 40px; text-align: right; color: #00ff00; }
    .lb-score { width: 60px; text-align: right; color: #00bfff; }

    #spam-msg-confirm {
        position: absolute; top: 50%; left: 50%; transform: translate(-50%, -165px);
        background: rgba(0,0,0,0.8); padding: 10px 20px; border-radius: 5px;
        color: #00bfff; font-family: 'Consolas', monospace; font-size: 0.8rem;
        pointer-events: none; opacity: 0; transition: opacity 0.3s;
        white-space: nowrap; border: 1px solid #00bfff;
        z-index: 9003;
    }
    
    #spam-bot-warning {
        position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
        background: rgba(220, 20, 60, 0.9);
        color: white; padding: 12px 25px; border-radius: 30px;
        font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; letter-spacing: 1px;
        pointer-events: none; opacity: 0;
        transition: opacity 1.5s ease;
        z-index: 9010;
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.3);
        white-space: nowrap;
    }

    #spam-lb-icon {
        position: fixed; bottom: 20px; right: 20px;
        width: 30px; height: 30px;
        background: rgba(0,0,0,0.5); border: 1px solid white;
        display: flex; justify-content: center; align-items: center;
        cursor: pointer; z-index: 9005;
        font-size: 16px; color: white; border-radius: 5px;
        display: none;
    }
    #spam-lb-icon:hover { background: white; color: black; }

    .explode-anim {
        animation: explodeTable 0.5s forwards ease-out;
    }
    @keyframes explodeTable {
        0% { transform: translateY(-50%) scale(1); opacity: 1; }
        50% { transform: translateY(-50%) scale(1.2); opacity: 0.8; filter: brightness(2); }
        100% { transform: translateY(-50%) scale(2); opacity: 0; filter: blur(10px); }
    }

    #login-modal, #register-modal, #forgot-modal {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        z-index: 1000;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .login-container {
        background: rgba(20, 20, 30, 0.95);
        border: 1px solid rgba(0, 191, 255, 0.3);
        border-radius: 15px;
        padding: 30px 40px;
        width: 320px;
        position: relative;
        box-shadow: 0 0 30px rgba(0, 191, 255, 0.2);
    }

    .login-title {
        color: #00bfff;
        font-family: 'Segoe UI', sans-serif;
        font-weight: 300;
        letter-spacing: 3px;
        text-align: center;
        margin: 0 0 25px 0;
        font-size: 1.2rem;
    }

    .login-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .login-input {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        padding: 12px 15px;
        color: white;
        font-family: 'Segoe UI', sans-serif;
        font-size: 0.9rem;
        outline: none;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

    .login-input:focus {
        border-color: #00bfff;
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
    }

    .login-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    .login-btn {
        background: linear-gradient(135deg, #00bfff, #0080ff);
        border: none;
        border-radius: 8px;
        padding: 12px;
        color: white;
        font-family: 'Segoe UI', sans-serif;
        font-weight: 600;
        letter-spacing: 1px;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        margin-top: 5px;
    }

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(0, 191, 255, 0.4);
    }

    .login-btn:active {
        transform: translateY(0);
    }

    .login-google-btn {
        background: white;
        border: none;
        border-radius: 8px;
        padding: 12px;
        color: #333;
        font-family: 'Segoe UI', sans-serif;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .login-google-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
    }

    .google-icon {
        font-weight: bold;
        background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-size: 1.2rem;
    }

    .login-links {
        margin-top: 20px;
        text-align: center;
        font-size: 0.8rem;
    }

    .login-links a {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        transition: color 0.3s;
    }

    .login-links a:hover {
        color: #00bfff;
    }

    .login-sep {
        margin: 0 10px;
        color: rgba(255, 255, 255, 0.3);
    }

    .login-message {
        margin-top: 15px;
        padding: 10px;
        border-radius: 5px;
        text-align: center;
        font-size: 0.8rem;
        display: none;
    }

    .login-message.success {
        display: block;
        background: rgba(0, 255, 0, 0.1);
        border: 1px solid rgba(0, 255, 0, 0.3);
        color: #00ff00;
    }

    .login-message.error {
        display: block;
        background: rgba(255, 0, 0, 0.1);
        border: 1px solid rgba(255, 0, 0, 0.3);
        color: #ff4444;
    }
