body{margin:0;padding:0;font-family:sans-serif; background-color: #f4f4f4;overflow:hidden;/* avoid horizontal scroll */}
header{text-align:center;padding:1rem 1rem;background:#eee;position:relative;top:0;width:100%;box-shadow:0 1px 4px rgba(0,0,0,.1);z-index:20;min-height:20px;}

/* three small circles on left side of header */
.header-circles{position:absolute;left:1rem;top:50%;transform:translateY(-50%);display:flex;gap:.5rem;}

/* logo in header  */
header #pearhone{
    position:absolute;
    right:3rem; 
    top:50%;
    transform:translateY(-75%);
    height:24px; 
}

/* thib logo in header */
header #thib{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    height:70px;
}


/* Menus UI */


/* three small circles on left side of header */
.header-circles{position:absolute;left:1rem;top:50%;transform:translateY(-50%);display:flex;gap:.5rem;}
.header-circles .circle{width:13px;height:13px;border-radius:50%;}
/* individual circle colors by id */
#circle1 { background: #e74c3c; } 
#circle1:hover { background: #c0392b; transform: scale(1.2); transition: 0.2s ease; }   
#circle2 { background: #f1c40f; } 
#circle2:hover { background: #d4ac0d; transform: scale(1.2); transition: 0.2s ease; }   
#circle3 { background: #2ecc71; }    
#circle3:hover { background: #27ae60; transform: scale(1.2); transition: 0.2s ease; }

/*dispostion of the layers */
.layer{display:none;position:absolute;top:0;left:0;width:100%;height:100%;}
.layer.active{display:flex;z-index:10;justify-content:center;align-items:center;flex-direction:column;}
        
.LayerMenu.layer.active{display:flex;justify-content:center;align-items:center;height:100vh;padding-top:60px; flex-direction: column;}
 /* Button for menu */
.menu-button{
    margin:0.5rem;
    padding:.75rem 1.5rem;
    font-size:1rem;
    cursor: pointer;
    /* smooth transform and background-gradient transitions */
    transition: transform 0.2s ease,  0.10s ease;
}

.LayerMenu .menu-button{
    background: linear-gradient(45deg, #fbc2eb 0%,#a6c1ee 100%);
    color:#fff;
    border:none;
    border-radius:5px;
    transition: 0.3s;
    width: 150px;
}
.LayerMenu .menu-button:hover {
    background: linear-gradient(45deg, #a6c1ee 0%, #fbc2eb 100%);
    transform: scale(1.1);
}
        
/* layer specific backgrounds */
.LayerMenu { background: linear-gradient(135deg, #ffaf02 0%, #ffb8eb 100%); }
.LayerGameUINoSave { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.LayerSettings, .LayerCredits { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }

.settings-content, .credits-content {
    background: linear-gradient(135deg, #ffe29f 0%, #ffa99f 100%);
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* settings form styles */
.LayerSettings form {
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
}
.LayerSettings .setting-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.LayerSettings label {
    flex: 1 0 30%;
}
.LayerSettings input[type="range"] {
    flex: 1 0 50%;
}
.LayerSettings select {
    flex: 1 0 50%;
    padding: .5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.LayerSettings .setting-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.LayerSettings .setting-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #a6c1ee; /* Match the theme */
}

.setting-description {
    font-size: 0.8rem;
    color: #555;
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    max-width: 80%;
    line-height: 1.3;
}

/* logo in menu */
.LayerMenu #logo {
    display: block;
    max-width: 600px;
    width: 90%;
    height: auto;
    margin: 0 auto 1rem;
    position: relative; 
    animation: logoteam 7s linear infinite;
}
@keyframes logoteam {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}
        
p {
    max-width: 500px;
    line-height: 1.5;
    text-align: center;
    margin-top: 2rem;
    color: #444;
    font-style: italic; 
    padding-left: 15px;
}

/* Game UI  */



/* Button for games */
.Button-GameUI {
    margin: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.75);
    transition: transform 0.2s ease, background 0.2s ease;
}

.Button-GameUI:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.9);
}

.LayerGameUINoSave.layer.active {
    display: grid;
}

/* grid mapping */
.LayerGameUINoSave {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    grid-template-rows: 1fr 250px;
    grid-template-areas: "left center right" "left bottom-center bottom-right";
    gap: 0.5rem;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    padding: 100px 0 0 0; /* (header) */
    background: linear-gradient(135deg, #ffc7ef 0%, #9ab7e9 100%);
    align-items: stretch;
}

.LayerGameUINoSave p {
    max-width: none;
    margin: 0.5rem 0;
    padding-left: 0;
    text-align: left;
    color: #363636;
    font-style: normal;
}

.panel {
    position: relative;
    overflow: visible;
    height: 100%;
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    padding: 1.3rem;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    box-sizing: border-box;
}

.panel h2 {
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.2rem;
    color: #2e2e2e;
}

.panel hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.5);
    margin: 1.3rem 0;
}

.panel .Button-GameUI {
    width: 100%;
    margin: 0.5rem 0 1rem 0;
}



/* left panel config */
.panel-left {
    grid-area: left;
    border-radius: 0 20px 0 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.upgrade-layout {
    flex: 1;
    display: grid;
    grid-template-rows: 1fr 2px 1fr;
    gap: 1rem;
    height: 100%;
    margin-top: 1.5rem;
    min-height: 0;
}

.upgrade-section {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
    min-height: 0;
}

.upgrade-title {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

.upgrade-title h2 {
    margin: 0;
    text-align: center;
    font-size: 1rem;
}

.upgrade-box {
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: inset 0 1px 10px rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}


.upgrade-divider {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 100px;
    width: 100%;
    align-self: center;
}

.upgrade-box h2 {
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1rem;
}

.upgrade-box p {
    text-align: left;
    margin:  0.5rem 0 0.25rem 0;
    padding-left: 0;
}

.upgrade-box .Button-GameUI {
    width: 100%;
    margin: 0.5rem 0 1rem 0;
}
/* end of left panel config */



.panel-right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 20px 0 0 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-case {
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1.2;
    transition: transform 0.2s ease, background 0.2s ease;
    text-align: center;
}

.project-case small {
    font-size: 0.7rem;
    opacity: 0.8;
    display: block;
}

.project-case.is-brought {
    cursor: default;
    opacity: 0.7;
}

.panel-bottom-center {
    grid-area: bottom-center;
    border-radius: 20px 20px 0 0;
}

.panel-bottom-right {
    grid-area: bottom-right;
    border-radius: 20px 0 0 0;
}

.game-center {
    grid-area: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* floatint text (like chat) */
#floatingTexts {
    position: absolute;
    left: 5rem;
    top: 90%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 500px;
    min-height: 200px;
}

.floating-text {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    font-size: 1rem;
    color: #790000;
    text-shadow: 0 1px 10px rgba(255,255,255,0.8);
    opacity: 1;
    animation: floatUpFade 1s ease-out forwards;
}

@keyframes floatUpFade {
    0% {
        transform: translateY(0px);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}



.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

#resetBtn {
    margin-left: auto;
}

.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.stats-row p {
    margin: 0;
    padding-left: 0;
    text-align: center !important;
    min-width: 200px;
}

.single-stat {
    margin-top: 0.1rem;
}

.money-shop {
    display: flex;
    flex-direction: column;
}

.money-shop p {
    margin: 0.5rem 0 0.2rem 0;
    text-align: left;
    padding-left: 0;
}

.panel-right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 10px 0 0 20px;
    gap: 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
}

.project-case {
    min-height: 100px;
    padding: 0.7rem;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    font-weight: bold;
}

.project-case:hover:not(:disabled) {
    transform: scale(1.05);
}

.project-case:disabled, .project-case.is-bought, #launchBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.clicker-zone {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;    
    text-align: center;
}

.center-zone {
    text-align: center;
}




/* specials upgrades */
.bottom-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    height: 100%;
    align-items: stretch;
}

.bottom-feature {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.bottom-feature h3 {
    margin: 0 0 0.2rem 0;
    margin-bottom: 0.2rem;
    text-align: center;
    font-size: 1rem;
    color: #2b2b2b;
}

.bottom-feature p {
    margin: 0.2rem 0;
    text-align: center;
    padding-left: 0;
    max-width: none;
    line-height: 1.2;
}

.bottom-feature .Button-GameUI {
    width: 100%;
    padding: 1rem 1rem;
}

.super-stats-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    margin: 0.1rem 0;
    line-height: 1.2;
    color: white;
}

.separator {
    opacity: 0.5;
}
/* end specials upgrades */





.panel-toggle {
    position: absolute;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 100px;
    background: white;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 5;
    font-size: 1rem;
}

.panel-left .panel-toggle {
    top: 10px;
    right: -20px;
}

.panel-bottom-center .panel-toggle {
    top: -20px;
    right: auto;

}

.panel-right .panel-toggle, .panel-bottom-right .panel-toggle {
    top: 10px;
    left: -20px;
}

.panel-left.is-collapsed {
    transform: translateX(calc(-100% + 40px));
}

.panel-right.is-collapsed, .panel-bottom-right.is-collapsed {
    transform: translateX(calc(100% - 40px));
}

.panel-bottom-center.is-collapsed {
    transform: translateY(calc(100% - 40px));
}





/* unlocked upgrade color */
.Button-GameUI.can-buy {
    background: linear-gradient(135deg, #57e277 0%, #199141 100%) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    box-shadow: 0 0 15px rgba(34, 161, 74, 0.3);
}

.Button-GameUI.can-buy:hover {
    background: linear-gradient(135deg, #20973c 0%, #4edb7b 100%) !important;
    transform: scale(1.1);
}
/* endunlocked upgrade color */





/* buttons */
#mainClickBtn {
    background-color: rgba(255, 255, 255, 0);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#mainClickBtn:hover {
    transform: scale(1.1);
}

/* resp */
@media (max-width: 1100px) {
    body { overflow: auto; } /* Necessary to scroll the vertical stack */
    .LayerGameUINoSave {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas: "center" "left" "right" "bottom-center" "bottom-right";
        padding: 100px 1rem 1rem;
        height: auto; /* Necessary to avoid cutting the content */
    }

    .panel-left, .panel-right, .panel-bottom-center, .panel-bottom-right {
        transform: none !important;
        border-radius: 20px;
    }

    .panel-toggle {
        display: none;
    }

    .bottom-panel-grid {
        grid-template-columns: 1fr;
    }
}

/* cps */
#cpsDisplay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

#cpsDisplay.is-max {
    color: white;
    opacity: 1;
}

#mainClickBtn.is-cps-blocked {
    opacity: 0.7;
    transform: scale(0.9);
}
/* end cps */








/* Overlay Start(before menu) */
#startOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); 
}

#btnStart {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    font-size: 2rem;
    padding: 1rem 3rem;
    border-radius: 10px;
}
#btnStart:hover {
    background-color: rgba(255, 255, 255, 0.2);
}



/* --- Background Profiles for GameUI --- */

/* Profile 1: Original (Pink/Blue) */
.LayerGameUINoSave.bg-profile1 {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}
.LayerGameUINoSave.bg-profile1 .upgrade-btn,
.LayerGameUINoSave.bg-profile1 .menu-button {
    background: linear-gradient(90deg, #a6c1ee, #fbc2eb);
    color: white;
}
.LayerGameUINoSave.bg-profile1 .main-click-btn {
    background: linear-gradient(135deg, #ffaf02, #ffb8eb);
    color: white;
}
/* Profile 1 Elements */
.LayerGameUINoSave.bg-profile1 .panel { background: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.5); }
.LayerGameUINoSave.bg-profile1 .upgrade-title, 
.LayerGameUINoSave.bg-profile1 .bottom-feature { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.LayerGameUINoSave.bg-profile1 .upgrade-box { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.4); box-shadow: inset 0 1px 10px rgba(255,255,255,0.2); }
.LayerGameUINoSave.bg-profile1 .upgrade-divider { background: rgba(255, 255, 255, 0.7); }
.LayerGameUINoSave.bg-profile1 .Button-GameUI { background: rgba(255,255,255,0.75); color: #363636; }
.LayerGameUINoSave.bg-profile1 .Button-GameUI:hover { background: rgba(255,255,255,0.9); }
.LayerGameUINoSave.bg-profile1 p, 
.LayerGameUINoSave.bg-profile1 h2, 
.LayerGameUINoSave.bg-profile1 h3 { color: #363636; }
.LayerGameUINoSave.bg-profile1 .project-case {
    background: rgba(255,255,255,0.75);
    color: #363636;
    border: 1px solid transparent;
}
.LayerGameUINoSave.bg-profile1 .project-case:not([disabled]):hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.05);
}
.LayerGameUINoSave.bg-profile1 .project-case.is-brought {
    background: rgba(255,255,255,0.5);
}

/* Settings Profile 1 */
.LayerSettings.bg-profile1 .settings-content,
.LayerCredits.bg-profile1 .credits-content {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    color: #444;
}
.LayerSettings.bg-profile1 .menu-button,
.LayerCredits.bg-profile1 .menu-button {
    background: linear-gradient(90deg, #a6c1ee, #fbc2eb);
    color: white;
    border: none;
    border-radius: 5px;
}

/* Profile 2: Night Mode (Dark Blue/Purple) */
.LayerGameUINoSave.bg-profile2 {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
}
header.in-game.bg-profile2 {
    background: #182848;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
header.in-game.bg-profile2 #headerMsg {
    background: rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
}
.LayerGameUINoSave.bg-profile2 .upgrade-btn,
.LayerGameUINoSave.bg-profile2 .menu-button {
    background: linear-gradient(90deg, #4b6cb7, #182848);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.LayerGameUINoSave.bg-profile2 .main-click-btn {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
    color: white;
    box-shadow: 0 0 15px rgba(138, 45, 226, 0.6);
}
/* Profile 2 Elements (Night Mode) */
.LayerGameUINoSave.bg-profile2 .panel { background: rgba(0, 0, 0, 0.4); border-color: rgba(255,255,255,0.1); }
.LayerGameUINoSave.bg-profile2 .upgrade-title, 
.LayerGameUINoSave.bg-profile2 .bottom-feature { background: rgba(0, 0, 0, 0.3); border-color: rgba(255,255,255,0.1); }
.LayerGameUINoSave.bg-profile2 .upgrade-box { background: rgba(0, 0, 0, 0.4); border-color: rgba(255,255,255,0.1); box-shadow: inset 0 1px 10px rgba(0,0,0,0.5); }
.LayerGameUINoSave.bg-profile2 .upgrade-divider { background: rgba(255, 255, 255, 0.2); }
.LayerGameUINoSave.bg-profile2 .Button-GameUI { background: rgba(0, 0, 0, 0.6); color: white; border: 1px solid rgba(255,255,255,0.2); }
.LayerGameUINoSave.bg-profile2 .Button-GameUI:hover { background: rgba(0, 0, 0, 0.8); border-color: rgba(255,255,255,0.4); }
.LayerGameUINoSave.bg-profile2 p, 
.LayerGameUINoSave.bg-profile2 h2, 
.LayerGameUINoSave.bg-profile2 h3 { color: #e0e0e0; }
.LayerGameUINoSave.bg-profile2 .project-case {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.LayerGameUINoSave.bg-profile2 .project-case:not([disabled]):hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.05);
}
.LayerGameUINoSave.bg-profile2 .project-case.is-brought {
    background: rgba(0, 0, 0, 0.4);
}

/* Settings Profile 2 */
.LayerSettings.bg-profile2 .settings-content,
.LayerCredits.bg-profile2 .credits-content {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    color: white;
}
.LayerSettings.bg-profile2 p,
.LayerSettings.bg-profile2 .setting-description,
.LayerCredits.bg-profile2 p {
    color: black;
}
.LayerSettings.bg-profile2 .menu-button,
.LayerCredits.bg-profile2 .menu-button {
    background: linear-gradient(90deg, #4b6cb7, #182848);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
}

/* Profile 3: Mint Fresh (Green) */
.LayerGameUINoSave.bg-profile3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.LayerGameUINoSave.bg-profile3 .upgrade-btn,
.LayerGameUINoSave.bg-profile3 .menu-button {
    background: linear-gradient(90deg, #11998e, #38ef7d);
    color: white;
}
.LayerGameUINoSave.bg-profile3 .main-click-btn {
    background: linear-gradient(135deg, #d4fc79, #96e6a1);
    color: #2c3e50; 
}
/* Profile 3 Elements (Mint) */
.LayerGameUINoSave.bg-profile3 .panel { background: rgba(255, 255, 255, 0.6); border-color: rgba(255,255,255,0.6); }
.LayerGameUINoSave.bg-profile3 .upgrade-title, 
.LayerGameUINoSave.bg-profile3 .bottom-feature { background: rgba(255, 255, 255, 0.4); border-color: rgba(255,255,255,0.5); }
.LayerGameUINoSave.bg-profile3 .upgrade-box { background: rgba(255, 255, 255, 0.5); border-color: rgba(255,255,255,0.5); box-shadow: inset 0 1px 10px rgba(255,255,255,0.3); }
.LayerGameUINoSave.bg-profile3 .upgrade-divider { background: rgba(255, 255, 255, 0.8); }
.LayerGameUINoSave.bg-profile3 .Button-GameUI { background: rgba(255, 255, 255, 0.85); color: #2c3e50; border: none; }
.LayerGameUINoSave.bg-profile3 .Button-GameUI:hover { background: #ffffff; }
.LayerGameUINoSave.bg-profile3 p, 
.LayerGameUINoSave.bg-profile3 h2, 
.LayerGameUINoSave.bg-profile3 h3 { color: #2c3e50; }
.LayerGameUINoSave.bg-profile3 .project-case {
    background: rgba(255, 255, 255, 0.85);
    color: #2c3e50;
    border: none;
}
.LayerGameUINoSave.bg-profile3 .project-case:not([disabled]):hover {
    background: #ffffff;
    transform: scale(1.05);
}
.LayerGameUINoSave.bg-profile3 .project-case.is-brought {
    background: rgba(255, 255, 255, 0.6);
}

/* Settings Profile 3 */
.LayerSettings.bg-profile3 .settings-content,
.LayerCredits.bg-profile3 .credits-content {
    background: linear-gradient(135deg, #43e97b 0%, #7efee7 100%);
    color: #2c3e50;
}
.LayerSettings.bg-profile3 .menu-button,
.LayerCredits.bg-profile3 .menu-button {
    background: linear-gradient(90deg, #11998e, #38ef7d);
    color: white;
    border: none;
    border-radius: 5px;
}

/* end panel */
.LayerServerEnd {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 20;
}

.LayerServerEnd.layer.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.serverEnd-content {
    position: relative;
    width: 50vw;
    height: 50vh;
    min-width: 300px;
    min-height: 220px;
    max-width: 800px;
    max-height: 600px;
    background: linear-gradient(135deg, #cecece 0%, #576091 100%);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.serverEnd {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.serverEnd-body {
    margin: 0;
    padding: 0;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #292929;
}

.close-popup-btn  {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.close-popup-btn:hover {
    transform: scale(1.1);
}

/* --- Header Message (Toast) --- */
#headerMsg {
    position: absolute;
    left: 1.2rem;
    top: 42px; 
    font-size: 0.75rem;
    font-weight: bold;
    color: #555;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; 
    white-space: nowrap;
}
#headerMsg.visible {
    opacity: 1;
}

/* --- Game Modes --- */
/* Hide the debug button by default (in Classic Mode) */
body:not(.mode-debug) #devClickBtn,
body:not(.mode-debug) #resetBtn {
    display: none !important;
}

/* --- Custom Scrollbars --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Dark Theme (Profile 2) specific scrollbar */
.bg-profile2 ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.bg-profile2 ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}