*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input,
button,
textarea,
select {
    font: inherit;
}

:root {
    /* Windows XP Palette & Utilities */
    --xp-blue: #0055ea;
    --xp-blue-dark: #003399;
    --xp-bg: #ece9d8;
    --xp-border: #0055ea;
    --xp-taskbar-grad: linear-gradient(180deg, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #1941a5 100%);
    --xp-title-grad: linear-gradient(180deg, #ffffff 0%, #9fc6ff 4%, #4793ff 8%, #0058ee 12%, #0055ea 88%, #003db3 94%, #002299 100%);
}

body {
    height: 100vh;
    overflow: hidden;
    font-family: Tahoma, "Arial", sans-serif;
    font-size: 11px;
    background-color: #004e98;
}

#desktop {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#desktop-area {
    position: fixed;
    inset: 0;
    background: url('SiteImages/windows_xp_bliss-wide.jpg') no-repeat center center / cover;
}

#desktop-icons {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 64px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

    .desktop-icon:focus {
        outline: none;
    }

    .desktop-icon img {
        width: 32px;
        height: 32px;
    }

    .desktop-icon span {
        color: #fff;
        font-size: 11px;
        text-align: center;
        text-shadow: 1px 1px 2px #000, 0 0 6px #000;
        line-height: 1.3;
        word-break: break-word;
    }

    .desktop-icon:hover span,
    .desktop-icon:focus span {
        background: #0b61a4;
        border: 1px dotted #ffffff;
        text-shadow: none;
    }


.win {
    position: absolute;
    user-select: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--xp-bg);
    border: 3px solid #7a96df;
    border-radius: 8px 8px 0 0;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.45);
}

    .win.active {
        border-color: var(--xp-border);
    }


    .win .title-bar {
        background: #0055ea;
        background: var(--xp-title-grad);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 3px 6px;
        height: 25px;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
    }

    .win .title-bar-text {
        display: flex;
        align-items: center;
        font-weight: bold;
        color: #fff;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .win .title-bar-controls {
        display: flex;
        gap: 2px;
        align-items: center;
        flex-shrink: 0;
    }

        .win .title-bar-controls button {
            width: 21px;
            height: 21px;
            background: linear-gradient(180deg, #245edb 0%, #1941a5 100%);
            border: 1px solid #ffffff;
            border-radius: 3px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.4);
        }

            .win .title-bar-controls button:hover {
                filter: brightness(1.2);
            }

            .win .title-bar-controls button:active {
                filter: brightness(0.9);
                box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
            }

            /* Minimize Icon */
            .win .title-bar-controls button[aria-label="Minimize"]::after {
                content: "";
                display: block;
                width: 7px;
                height: 2px;
                background: #fff;
                margin-top: 4px;
            }

            /* Maximize Icon (Box with top title bar) */
            .win .title-bar-controls button[aria-label="Maximize"]::after {
                content: "";
                display: block;
                width: 9px;
                height: 8px;
                border-top: 3px solid #fff;
                border-left: 1px solid #fff;
                border-right: 1px solid #fff;
                border-bottom: 1px solid #fff;
                box-sizing: border-box;
            }

            /* Close Button (Red/Orange XP Style) */
            .win .title-bar-controls button[aria-label="Close"] {
                background: linear-gradient(180deg, #e83821 0%, #b81c0c 100%);
            }

                .win .title-bar-controls button[aria-label="Close"]:hover {
                    background: linear-gradient(180deg, #f0523c 0%, #cc2412 100%);
                    filter: none;
                }

                .win .title-bar-controls button[aria-label="Close"]:active {
                    background: linear-gradient(180deg, #b81c0c 100%, #901408 100%);
                    filter: none;
                    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
                }

                .win .title-bar-controls button[aria-label="Close"]::after {
                    content: "✕";
                    color: #fff;
                    font-size: 9px;
                    font-weight: bold;
                    line-height: 1;
                }

    /* Inactive Window Title Bar (Faded Blue/Gray with Classic XP Top Sheen) */
    .win .title-bar:not(.active),
    .win:not(.active) .title-bar {
        background: linear-gradient(180deg, #e4edff 0%, #b8cbf3 6%, #9db7eb 12%, #7a96df 100%);
        color: #d8d8d8;
    }

    /* Inactive Window Control Buttons */
    .win:not(.active) .title-bar-controls button {
        background: linear-gradient(180deg, #b8c9f1 0%, #8ca4e0 100%);
        border: 1px solid #a6bbf3;
        box-shadow: none;
    }

        .win:not(.active) .title-bar-controls button[aria-label="Close"] {
            background: linear-gradient(180deg, #d89389 0%, #b06056 100%);
            border: 1px solid #c8a098;
        }

        .win:not(.active) .title-bar-controls button::after {
            border-color: #e2e8f8;
            background-color: transparent;
            color: #e2e8f8;
        }

        .win:not(.active) .title-bar-controls button[aria-label="Minimize"]::after {
            background: #e2e8f8;
        }

        .win:not(.active) .title-bar-controls button[aria-label="Maximize"]::after {
            border-top-color: #e2e8f8;
            border-left-color: #e2e8f8;
            border-right-color: #e2e8f8;
            border-bottom-color: #e2e8f8;
        }

        .win:not(.active) .title-bar-controls button:hover {
            filter: none;
            background: linear-gradient(180deg, #c4d3f3 0%, #98aee6 100%);
        }

        .win:not(.active) .title-bar-controls button[aria-label="Close"]:hover {
            background: linear-gradient(180deg, #e2a39a 0%, #bc7066 100%);
        }

    .win > .window-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--xp-bg);
        color: #000;
    }

        .win > .window-body.no-scroll {
            overflow: hidden;
        }

    .win.glass {
        background: var(--xp-bg);
        border: 3px solid #7a96df;
    }

        .win.glass.active {
            border-color: var(--xp-border);
        }

        .win.glass:after {
            display: none;
        }

.rh {
    position: absolute;
    z-index: 10;
}

.rh-n {
    top: 0;
    left: 4px;
    right: 4px;
    height: 4px;
    cursor: n-resize;
}

.rh-s {
    bottom: 0;
    left: 4px;
    right: 4px;
    height: 4px;
    cursor: s-resize;
}

.rh-w {
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    cursor: w-resize;
}

.rh-e {
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    cursor: e-resize;
}

.rh-nw {
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: nw-resize;
}

.rh-ne {
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: ne-resize;
}

.rh-sw {
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    cursor: sw-resize;
}

.rh-se {
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    cursor: se-resize;
}


#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    z-index: 9000;
    background: var(--xp-taskbar-grad);
    border-top: none !important;
    box-shadow: none;
}

    #taskbar::after {
        display: none;
    }

.taskbar-start {
    --start-width: 130px;
    --start-height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--start-width);
    height: var(--start-height);
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    z-index: 2;
    align-self: center;
    margin-top: 0px;
    margin-left: -5px;
    margin-right: 10px;
}

    .taskbar-start::before,
    .taskbar-start::after {
        content: "";
        position: absolute;
        width: var(--start-width);
        height: var(--start-height);
        top: 0;
        left: 0;
        background-image: url('SiteImages/StartButton.png');
        background-size: var(--start-width) calc(3 * var(--start-height));
        background-repeat: no-repeat;
        transition: opacity 0.2s ease !important;
        pointer-events: none;
    }

    .taskbar-start::before {
        background-position: 0 0;
        opacity: 1 !important;
    }

    .taskbar-start::after {
        background-position: 0 calc(-1 * var(--start-height));
        opacity: 0 !important;
    }

    .taskbar-start:hover::before {
        opacity: 0 !important;
    }

    .taskbar-start:hover::after {
        opacity: 1 !important;
    }

    .taskbar-start:active::after {
        background-position: 0 calc(-2 * var(--start-height));
    }

.taskbar-divider {
    width: 0px;
    height: 24px;
    align-self: center;
    background: linear-gradient(180deg, #093796, #5896ff, #093796);
    margin: 0 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

#taskbar-buttons {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1px;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}

    #taskbar-buttons::-webkit-scrollbar {
        display: none;
    }

.tb-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 12px;
    height: 34px;
    min-width: 170px;
    background: linear-gradient(180deg, #4f96ff 0%, #3174ed 50%, #1f55cc 100%);
    border: none !important;
    border-radius: 4px;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.4), inset -1px -1px 0 rgba(0, 0, 0, 0.2);
    cursor: pointer;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    -webkit-font-smoothing: antialiased;
}

    .tb-btn:hover {
        background: linear-gradient(180deg, #62a3ff 0%, #4383f4 50%, #2963de 100%);
        border: none !important;
        outline: none;
    }

    .tb-btn.active {
        background: linear-gradient(180deg, #1b4bb1 0%, #265bd9 50%, #1b4bb1 100%);
        border: none !important;
        box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.7);
        outline: none;
    }

    .tb-btn img {
        width: 18px;
        height: 18px;
        margin-right: 4px;
    }

.taskbar-tray {
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 100%;
    margin-left: auto; /* Pushes the tray all the way to the far right */
    background: linear-gradient(180deg, #1282e6 0%, #0962cb 100%); /* Classic XP notification area gradient */
    border-left: 1px solid #06378c; /* Dark side of the classic XP divider */
    box-shadow: inset 1px 0 0 #459dfc; /* Light highlight side of the dual-line XP divider */
    flex-shrink: 0;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.tray-clock {
    color: #ffffff;
    font-size: 11px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    min-width: 36px;
    text-align: center;
}

.sdot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    vertical-align: middle;
    flex-shrink: 0;
}

.s-online {
    background: #3ba55c;
}

.s-idle {
    background: #faa61a;
}

.s-dnd {
    background: #ed4245;
}

.s-offline {
    background: #888;
}

.avatar-wrap {
    position: relative;
    display: inline-block;
}

.avatar-badge {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #ece9d8;
    background: #888;
}

.social-btn-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    flex-wrap: wrap;
    gap: 4px;
}

    .social-btn-grid button {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        padding: 2px 8px;
        height: 24px;
        min-width: 108px;
        flex: 1 1 auto;
        background: linear-gradient(180deg, #ffffff 0%, #ece9d8 86%, #d8d0c5 100%);
        border: 1px solid #003c74;
        border-radius: 3px;
        cursor: pointer;
        color: #000;
    }

        .social-btn-grid button:hover {
            border-color: #e59700;
        }

        .social-btn-grid button img {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
        }

#win-mediaplayer > .window-body {
    padding: 0;
    background: transparent;
    border: none;
    margin: 0;
    box-shadow: none;
}

.mp-outer {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background-color: #1a222d;
}

.mp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#mp-idle {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

    #mp-idle img {
        width: 72px;
        height: 72px;
        opacity: 0.2;
    }

#mp-active {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.mp-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 0;
}

.mp-art {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 2px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.mp-bottom {
    flex-shrink: 0;
    padding: 7px 10px 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #2d3848;
}

.mp-meta {
    min-width: 0;
}

.mp-song {
    font-weight: 600;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-artist {
    font-size: 10px;
    color: #a0aec0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.mp-album {
    font-size: 10px;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-seek-track {
    height: 5px;
    background: #2d3848;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.mp-seek-fill {
    height: 100%;
    background: #3182ce;
    width: 0%;
    transition: width 1s linear;
    border-radius: 2px;
}

.mp-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #a0aec0;
}

.mp-btn-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

    .mp-btn-row button {
        min-width: unset;
        min-height: unset;
        height: 20px;
        padding: 0 8px;
        font-size: 10px;
        display: flex;
        align-items: center;
        gap: 4px;
        background: linear-gradient(180deg, #ffffff 0%, #ece9d8 100%);
        border: 1px solid #003c74;
        border-radius: 2px;
        cursor: pointer;
    }

        .mp-btn-row button img {
            width: 11px;
            height: 11px;
        }

.mp-status {
    flex: 1;
    color: #a0aec0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: 9px;
}

.win .status-bar {
    background: #ece9d8;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-top: 1px solid #aca899;
    margin: 0;
    box-shadow: none;
    flex-shrink: 0;
    display: flex;
    padding: 2px;
}

.win .status-bar-field {
    border: 1px solid #ffffff;
    border-right-color: #aca899;
    border-bottom-color: #aca899;
    font-size: 10px;
    color: #444;
    padding: 2px 4px;
}

.gh-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.repo-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #7f9db9;
}

.repo-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #ece9d8;
    border-bottom: 1px solid #aca899;
    flex-shrink: 0;
}

.repo-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px dotted #ccc;
    cursor: pointer;
}

    .repo-item:last-child {
        border-bottom: none;
    }

    .repo-item:hover {
        background: #316ac5;
        color: #ffffff;
    }

        .repo-item:hover .repo-desc,
        .repo-item:hover .repo-meta {
            color: #dce6f5;
        }

.repo-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.repo-desc {
    color: #555;
    font-size: 11px;
}

.repo-meta {
    color: #888;
    display: flex;
    gap: 10px;
    font-size: 11px;
}

.repo-lang-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 3px;
}

.repo-tag {
    background: #f1efe2;
    padding: 1px 6px;
    border: 1px solid #aca899;
    border-radius: 0px;
    font-size: 10px;
}