/* ============================================
   Windows93 - Desktop Styles
   Classic Windows 93/95 Desktop
   ============================================ */

/* Desktop Container */
#desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Desktop Area */
#desktop-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px; /* Space for taskbar */
    overflow: hidden;

    /* Tux blue wallpaper with swirls */
    background:
        url('../images/tuxdesktopbackground.png') center/cover no-repeat,
        /* Fallback gradient if image fails */
        radial-gradient(ellipse 150% 80% at 10% 90%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(ellipse 120% 60% at 90% 20%, rgba(255,255,255,0.1) 0%, transparent 40%),
        radial-gradient(ellipse 80% 100% at 50% 100%, rgba(0,50,100,0.3) 0%, transparent 60%),
        linear-gradient(180deg,
            #1e88e5 0%,
            #2196f3 20%,
            #42a5f5 40%,
            #64b5f6 60%,
            #5c9fd4 80%,
            #3d8bc9 100%
        );
}

/* Desktop Icons Container */
#desktop-icons {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px;
    max-height: calc(100% - 16px);
    z-index: var(--z-desktop);
}

/* Desktop Icon */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75px;
    padding: 4px;
    cursor: pointer;
    text-align: center;
}

.desktop-icon:hover .icon-label {
    background: var(--win-selection);
    color: var(--win-selection-text);
}

.desktop-icon.selected .icon-image {
    filter: brightness(0.7) sepia(1) hue-rotate(200deg) saturate(5);
}

.desktop-icon.selected .icon-label {
    background: var(--win-selection);
    color: var(--win-selection-text);
}

.desktop-icon .icon-image {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    /* Pixelated look for emojis */
    image-rendering: pixelated;
}

.desktop-icon .icon-image svg {
    width: 100%;
    height: 100%;
}

.desktop-icon .icon-label {
    font-size: 11px;
    color: var(--win-white);
    text-shadow:
        1px 0 0 var(--win-black),
        -1px 0 0 var(--win-black),
        0 1px 0 var(--win-black),
        0 -1px 0 var(--win-black),
        1px 1px 0 var(--win-black),
        -1px -1px 0 var(--win-black),
        1px -1px 0 var(--win-black),
        -1px 1px 0 var(--win-black);
    word-break: break-word;
    line-height: 1.2;
    padding: 2px 4px;
}

/* Windows Container */
#windows-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#windows-container > * {
    pointer-events: auto;
}

/* Start Menu */
#start-menu {
    position: fixed;
    bottom: 28px;
    left: 0;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow:
        inset 1px 1px 0 var(--win-white),
        4px 4px 0 rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: var(--z-start-menu);
    display: flex;
}

/* Start Menu Banner (Windows 93 sidebar) */
.start-menu-banner {
    width: 24px;
    background: linear-gradient(to top, #000080, #1084d0);
    display: flex;
    align-items: flex-end;
    padding: 8px 0;
}

.banner-text {
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    color: var(--win-white);
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
    margin-left: -40px;
}

.banner-93 {
    font-weight: normal;
    color: #c0c0c0;
}

/* Start Menu Items */
.start-menu-items {
    flex: 1;
    padding: 2px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px 6px 8px;
    cursor: pointer;
    position: relative;
}

.start-menu-item:hover {
    background: var(--win-selection);
    color: var(--win-selection-text);
}

.menu-icon {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.menu-label {
    font-size: 12px;
    flex: 1;
}

.submenu-arrow {
    font-size: 10px;
    margin-left: auto;
}

.start-menu-divider {
    height: 1px;
    background: var(--win-btn-shadow);
    border-bottom: 1px solid var(--win-btn-highlight);
    margin: 4px 2px;
}

/* Submenu */
.start-menu-item.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -2px;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    min-width: 160px;
}

.start-menu-item.has-submenu:hover .submenu {
    display: block;
}

.submenu .start-menu-item:hover {
    background: var(--win-selection);
    color: var(--win-selection-text);
}
