html.light {
    --bg1: 239, 241, 245;
    --bg2: 230, 233, 239;
    --bg3: 220, 224, 232;

    --text1: 76, 79, 105;
    --text2: 92, 95, 119; 
    --text3: 108, 111, 133;

    --accent1: 234, 118, 203;

    --sliderbg: 220, 224, 232;

    --bg-alpha: 0.1;

    --red: 210, 15, 57;
    

}

html.dark {
    --bg1: 36, 39, 58;
    --bg2: 30, 32, 48;
    --bg3: 24, 25, 38;

    --text1: 202, 211, 245;
    --text2: 184, 192, 224; 
    --text3: 165, 173, 203;

    --accent1: 245, 189, 230;
    
    --sliderbg: 220, 224, 232;

    --bg-alpha: 0.25;

    --red: 237, 135, 150;
    
}

body {
    background: 
        linear-gradient(rgb(0, 0, 0, var(--bg-alpha)) 0 0),
        url(../assets/bg.jpg);

    font-family: sans-serif;
    overflow: hidden;
    height: 100%;
    width: 100%;
}
html, body {
    margin: 0
}

a:link, a:visited {
    color: #aa7bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.panel {
    display: flex;
    justify-content: space-between;
    background-color: rgb(var(--bg3), 0.6);
    color: rgb(var(--text1));
    position: sticky;
    width: 100%;
    padding: 0, 20px;
    align-items: center;
}

#settings {
    cursor: pointer;
}



.window {
    position: absolute;
    color: rgb(var(--text1));
    
    transform: scale(0);
    transition: transform 300ms;
    will-change: transform;

}
@media (prefers-reduced-motion: reduce) {
    .window {
        animation: none !important;
        transition-duration: 0s !important;
    }
}
.window.open {
    transform: scale(1);
    backdrop-filter: blur(4px);
}



.titlebar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgb(var(--bg2));
    height: 1rem;
    user-select: none;
    padding: 5px;
    cursor: grab;
    border-radius: 5px 5px, 0, 0;

    p {
        margin: 0;
        padding: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;
        text-wrap: nowrap;
    };

    .close-btn {
        color: rgb(var(--text1));
        position: absolute;
        font-weight: bold;
        cursor: pointer;
        z-index: 1;
    }
}


.content {
    display: flex;
    justify-content: center;
    align-items: center;
    
    flex-wrap: wrap;
    gap: 1rem;
    
    background-color: rgb(var(--bg1), 0.75);

    border: 3px solid rgb(var(--bg2));
    border-radius: 0;

    p {
        width: 43%;
        text-align: center;
        background-color: rgb(var(--bg3));
        padding: 1rem;
        border-radius: 5px;    
    };

}

.projects-window .content, .socials-window .content {
    text-align: center;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-start;

    gap: 1rem 2rem;
    .app-icon {
        margin: 1rem;
        margin-left: 3%;
        color: rgb(var(--text2));
        border-color: rgb(var(--text2));
    };
    .app-icon i {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    };
    .app-icon .app-label {
        width: 20ch;
        height: 2ch;
        text-wrap: wrap;
    }

}


#socials .app-label, #projects .app-label {
    position: absolute !important;
    left: 5% !important;
    top: 75% !important;

    text-align: center;
    width: 20ch;
}

.app-icon#connect4 i {
    top: 5%;
    transform: translate(-50%, 0);
}
.app-icon#connect4 i#yellow {
    top: 50%;
}
.popup-window .content {
    gap: 2rem;
    height: 10rem;
    background-color: rgb(var(--bg2));
    border: 3px solid rgb(var(--bg3));
}
.popup-window {
    z-index: 1000 !important;
}
.popup-buttons {
    display: flex;
    gap: 3rem;
    justify-content: center;

    .confirm-btn, .cancel-btn {
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 10px;
        cursor: pointer;
    }
    .cancel-btn {
        background-color: rgb(255, 139, 139) 
    }
    .confirm-btn {
        background-color: rgb(180, 255, 180);
        font-weight: bold;
    }
    .cancel-btn:hover {
        background-color: rgb(255, 139, 139, 0.5) 
    }
    .confirm-btn:hover {
        background-color: rgb(180, 255, 180, 0.5);
    }
}
.desktop {
    display: flex;
    flex-wrap: wrap;
}
.app-icon {
    aspect-ratio: 1;
    width: 3rem;
    font-size: 1.5rem;
    color: white;
    background-color: transparent;
    border: 3px solid white;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
}
#projects, #socials {
    border: none;
    font-size: 3rem;
    color: pink;
}

.app-icon span {
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    font-size: 0.75rem;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 50%);
}
.app-icon#projects span, .app-icon#socials span {
    color: white;
    top: 100%;
    left: 50%;
    transform: translate(-28%, 50%);
}
.icon-img {
    width: 75%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.settings-window .content {
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;

}

#language-picker-select {
    text-align: center;
    background: rgb(var(--bg1));       
    border: 1px solid rgb(var(--text1));
    border-radius: 4px;           
    padding: 0.25rem 0.25rem;
    appearance: none;              /* remove default arrow styling */
    -webkit-appearance: none;      /* safari/chrome */
    -moz-appearance: none;         /* firefox */
    cursor: pointer;               
    font-size: 1rem;               
    color: inherit;  
    
    transform: translate(-25%, -25%)
}
#language-picker-select::after {
    content: 'hi';
    position: absolute;
    right: 0.5rem;
    pointer-events: none;
}

.switch-container, .lang-selector-container {
    width: 100%;
    display: flex;          
    justify-content: space-between; 
    align-items: center;    
    padding: 0 0.5rem;    
    
    border-bottom: 1px solid rgb(var(--text2), 0.2);
}

.language-selector-container form {
    display: inline-flex;
    background: transparent;
    border: none;

}

.switch-label, .language-selector-label {
    width: 150px;
    font-size: 1.2rem;
}

.language-selector-label {
    transform: translateY(-25%);
}

.switch {
    margin: 1rem;
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgb(var(--sliderbg));
    transition: .4s
}
.slider:before {
    position: absolute;
    content: "";
    height: 25px;
    width: 25px;
    left: 4px;
    bottom: 4px;
    background-color: white;
}
input:checked + .slider {
    background-color: rgb(var(--accent1))
}
input:focus + .slider {
    box-shadow: 0 0 1px rgb(var(--accent1));
}
input:checked + .slider:before {
    transform: translateX(25px);
}
.slider.round {
    border-radius: 34px;
}
  
.slider.round:before {
border-radius: 50%;
} 