:root {
    --xp-blue: #5a7edc;
    --xp-blue-dark: #3b5998;
    --xp-blue-light: #72a0f5;
    --xp-orange: #ff8a00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tahoma', 'Segoe UI', Geneva, Verdana, sans-serif;
}

body, html {
    height: 100%;
    overflow: hidden;
}

.xp-container {
    height: 100vh;
    width: 100vw;
    background: #5a7edc;
    background: radial-gradient(circle at 10% 20%, #7da0f5 0%, #3b5998 100%);
    display: flex;
    flex-direction: column;
    color: white;
}

.top-bar {
    height: 100px;
    background: #5a7edc;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
    position: relative;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 40px;
    text-align: right;
}

.xp-logo {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    margin-bottom: 20px;
}

.instruction {
    font-size: 1.2rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.divider {
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4) 20%, rgba(255,255,255,0.4) 80%, transparent);
    margin: 0;
    box-shadow: 1px 0 0 rgba(0,0,0,0.2);
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 40px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 2px;
    margin-bottom: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
    min-width: 380px;
    background: transparent;
    border: 1px solid transparent;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-item.active {
    background: rgba(0, 48, 156, 0.4);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2), inset 0 0 20px rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px;
    margin-left: -13px;
}

.user-frame {
    width: 60px;
    height: 60px;
    border: 2px solid #FFFFFF;
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    background: white;
}

.user-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.password-prompt {
    font-size: 0.9rem;
    margin-top: 4px;
    opacity: 0.9;
    display: none;
}

.active .password-prompt {
    display: block;
}

.password-field-container {
    margin-top: 8px;
    display: none;
    align-items: center;
}

.active .password-field-container {
    display: flex;
}

.password-input {
    width: 180px;
    height: 24px;
    border: 1px solid #7a96df;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 14px;
    outline: none;
}

.go-button {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4ed44e 0%, #2e8b2e 100%);
    border: 1px solid #1e5c1e;
    border-radius: 4px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.go-button.disabled {
    filter: grayscale(1) opacity(0.5);
    cursor: default;
    background: #ccc;
    border-color: #999;
}

.go-button.disabled:hover {
    filter: grayscale(1) opacity(0.5);
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 80px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 4px 0;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    margin-left: -40px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 10px;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.password-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #e0e0e0;
    display: none;
    align-items: center;
    gap: 8px;
}

.active .password-hint {
    display: flex;
}

.password-hint code {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #fff;
}

.copy-hint-btn {
    background: #003399;
    border: 1px solid #7a96df;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
}

.copy-hint-btn:hover {
    background: #0044cc;
}

.bottom-bar {
    height: 80px;
    background: linear-gradient(to top, #003399 0%, #0055ee 5%, #003399 100%);
    border-top: 2px solid #ff8a00;
    display: flex;
    align-items: center;
    padding: 0 40px;
    justify-content: space-between;
}

.shutdown-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.shutdown-icon {
    width: 32px;
    height: 32px;
    background: #ff4500;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}

.hint-text {
    font-size: 12px;
    opacity: 0.8;
    max-width: 400px;
    text-align: right;
}

/* Mobile Responsiveness for Login Screen */
@media (max-width: 800px) {
    .main-content {
        flex-direction: column;
        padding: 20px;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .left-panel {
        flex: none;
        align-items: center;
        text-align: center;
        padding-right: 0;
        margin-bottom: 30px;
        margin-top: 20px;
    }

    .xp-logo {
        width: 180px;
    }

    .divider {
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.4) 50%, transparent);
        margin: 20px 0;
        box-shadow: 0 1px 0 rgba(0,0,0,0.2);
    }

    .right-panel {
        flex: none;
        padding-left: 0;
        align-items: center;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .user-item {
        min-width: 300px;
        width: 100%;
        max-width: 380px;
        justify-content: flex-start;
        padding: 10px;
    }

    .user-item.active {
        margin-left: 0; /* Remove the negative desktop margin */
        padding: 15px;
        width: 105%; /* Subtle overlap for "active" feel */
    }

    .password-field-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .password-input {
        width: 140px; /* Smaller width for mobile */
    }

    .bottom-bar {
        height: auto;
        flex-direction: column;
        padding: 20px 15px;
        gap: 15px;
    }

    .hint-text {
        text-align: center;
        max-width: 100%;
    }

    .top-bar {
        height: 60px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.xp-container {
    animation: fadeIn 0.5s ease-out;
}
