/* Vintage Windows Desktop Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    overflow: hidden;
    height: 100vh;
    position: relative;
    z-index: 0;
}

.desktop {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #008080; /* Classic teal desktop color */
    background-image: 
        radial-gradient(circle at 25% 25%, #008b8b 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #006666 0%, transparent 50%);
}

.desktop-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    background: linear-gradient(45deg, 
        #008080 0%, 
        #20b2aa 25%, 
        #008080 50%, 
        #006666 75%, 
        #008080 100%);
    background-size: 200px 200px;
    opacity: 0.8;
}

.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 80px);
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(auto-fill, 100px);
    gap: 20px;
    align-content: start;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 100px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
    border-radius: 2px;
}

.desktop-icon:hover {
    background-color: rgba(0, 0, 128, 0.3);
    border: 1px dotted #ffffff;
}

.desktop-icon.selected {
    background-color: rgba(0, 0, 128, 0.5);
    border: 1px dotted #ffffff;
}

.icon-image {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    border: 2px outset #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #000080;
}

.icon-label {
    color: white;
    font-size: 11px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
    word-wrap: break-word;
    max-width: 76px;
    line-height: 1.2;
}

/* Taskbar */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 #808080;
}

.start-button {
    height: 30px;
    padding: 0 10px;
    background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
    border: 2px outset #c0c0c0;
    font-weight: bold;
    font-size: 11px;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.1s;
}

.start-button:hover {
    background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.start-button:active {
    border: 2px inset #c0c0c0;
    background: linear-gradient(to bottom, #a0a0a0 0%, #c0c0c0 100%);
}

.start-logo {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff0000, #ffff00, #00ff00, #0000ff);
    border-radius: 2px;
}

.taskbar-clock {
    height: 30px;
    padding: 0 10px;
    background: linear-gradient(to bottom, #f0f0f0 0%, #c0c0c0 100%);
    border: 2px inset #c0c0c0;
    font-size: 11px;
    color: #000000;
    display: flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
}

/* App-specific icon styling */
.icon-folder {
    background: linear-gradient(135deg, #ffff80 0%, #ffcc00 100%);
    color: #8B4513;
}

.icon-web {
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 100%);
    color: #000080;
}

.icon-app {
    background: linear-gradient(135deg, #98FB98 0%, #228B22 100%);
    color: #006400;
}

.icon-tool {
    background: linear-gradient(135deg, #DDA0DD 0%, #8B008B 100%);
    color: #4B0082;
}

.icon-game {
    background: linear-gradient(135deg, #F0E68C 0%, #DAA520 100%);
    color: #B8860B;
}

/* Responsive design */
@media (max-width: 768px) {
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 70px);
        grid-template-rows: repeat(auto-fill, 90px);
        gap: 15px;
    }
    
    .desktop-icon {
        width: 70px;
        height: 90px;
    }
    
    .icon-image {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .icon-label {
        font-size: 10px;
        max-width: 66px;
    }
}

/* Ensure windows appear above desktop */
.winbox {
    z-index: 1000;
}

/* Desktop stays in background */
.desktop {
    z-index: 1;
}

.taskbar {
    z-index: 999;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    min-width: 120px;
    z-index: 10000;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.context-menu-item {
    padding: 4px 16px;
    cursor: pointer;
    color: #000000;
    border-bottom: 1px solid #808080;
}

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

.context-menu-item:hover {
    background: #0000ff;
    color: white;
}
