/* Global */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI Variable", sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
    background: url("assets/background.webp") no-repeat center center/cover;
    background-size: cover;
    color: white;
    position: relative;
}

/* Lock */

.lock-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(25px);
    cursor: pointer;
    transition: 0.6s;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

.lock-content h1 {
    font-size: clamp(40px, 10vw, 90px);
    font-weight: 500;
    text-align: center;
}

.lock-content p {
    text-align: center;
    font-size: clamp(14px, 4vw, 20px);
    opacity: 0.8;
}

/* Login */

.login-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(35px);
}

.login-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    width: 300px;
    backdrop-filter: blur(40px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

.avatar {
    width: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.login-card input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    margin-top: 15px;
    outline: none;
}

/* Loading */

.loading {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(40px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Desktop icons */

.desktop {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    width: auto;
    height: auto;
    padding: 0;
}

/* Icons responsive */

.icon img {
    width: clamp(50px, 8vw, 64px);
}

.icon span {
    display: block;
    font-size: clamp(10px, 2.5vw, 14px);
    margin-top: 8px;
    text-align: left;
}

.icon {
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.2s;
    margin-left: 1em;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.icon.active {
    background: rgba(255, 255, 255, 0.25);
}

.taskbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.clock {
    font-size: 1rem;
}

.logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lock-screen,
.desktop,
.window {
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.hidden.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.lock-screen.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Windows */

.window {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: windowOpen .25s ease;
    transition: box-shadow .2s, transform .1s;
}

.window:active {
    transform: scale(1.01);
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.window-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    cursor: grab;
}

.window-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.window-header button:hover {
    color: #ff4d4d;
}

.window-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project {
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.project:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hidden */

.hidden {
    display: none;
}

/* Media Queries */

@media (max-width: 600px) {
    .desktop {
        top: 20px;
        left: 15px;
        gap: 15px;
    }

    .icon img {
        width: clamp(40px, 12vw, 64px);
    }

    .icon span {
        font-size: clamp(9px, 3vw, 12px);
    }

    .taskbar {
        width: 90%;
        height: 50px;
        padding: 0 10px;
    }
}

@media (max-width: 400px) {
    .taskbar {
        height: 40px;
        padding: 0 10px;
    }

    .window {
        top: 5%;
        width: 95%;
    }

    .icon span {
        font-size: 12px;
    }

    .lock-content h1 {
        font-size: clamp(30px, 15vw, 60px);
    }

    .lock-content p {
        font-size: clamp(12px, 4vw, 16px);
    }
}