.desktop {
    height: calc(100vh - 30px);
    padding: 10px;
    position: relative;
    overflow: auto;
    filter: saturate(1.05) contrast(1.02);
    image-rendering: auto;



    /* Windows XP Bliss background */
    background-image: url('../assets/xp-bliss.jfif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gallery img {
    width: 150px;
    margin: 6px;
    border: 1px solid #999;
}

/* Centered desktop photo frame */
.desktop-photo-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; /* stays behind windows */
    pointer-events: none; /* clicks pass through */
}

/* XP-style frame */
.xp-frame-title {
    justify-content: space-between;
    cursor: pointer;
}

/* Toggle icon */
.xp-toggle {
    font-size: 12px;
    padding: 0 6px;
}

/* Collapsible content */
.xp-frame-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

/* Collapsed state */
.xp-frame.collapsed .xp-frame-content {
    max-height: 0;
    padding: 0;
}


.desktop::-webkit-scrollbar {
    display: none;
}



.window {
    position: relative;
    width: 100%;
    height: 100%;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 30;
}

.overlay.active {
    display: block;
}

.dialog {
    position: absolute;
    width: 400px;
    background: #ece9d8;
    border: 2px solid #000;
    display: none;
    z-index: 40;
}

.dialog.active {
    display: block;
}

.title-bar {
    background: linear-gradient(#0a246a, #3a6ea5);
    color: white;
    padding: 4px;
    cursor: move;
    display: flex;
    justify-content: space-between;
}


/* Gallery Styles - XP Themed */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
}

.gallery-item {
    background: #ffffff;
    border: 1px solid #c0c0c0;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    background: #e8f4f8;
    border-color: #0054e3;
    box-shadow: 0 0 4px rgba(0, 84, 227, 0.3);
}

.gallery-item:active {
    background: #cce8ff;
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
    margin-bottom: 8px;
    overflow: hidden;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-icon {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gallery-item-label {
    font-size: 11px;
    color: #000;
    font-weight: normal;
    margin-bottom: 3px;
    word-break: break-word;
    width: 100%;
}

.gallery-item-size {
    font-size: 9px;
    color: #666;
}