/* Fondo y escritorio */
body {
    margin: 0;
    overflow: hidden;
    background: url("../imagenes/wallpaperxp.jpg") no-repeat center center fixed;
    background-size: cover;
    font-family: Tahoma, sans-serif;
}

/* Escritorio */
#desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
}

/* Iconos */
.icon {
    width: 80px;
    text-align: center;
    color: white;
    margin: 15px;
    cursor: pointer;
    float: left;
    user-select: none;
    position: relative;
}

.icon img {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto;
}

.icon span {
    display: block;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.icon.selected {
    outline: 2px solid #3399FF;
    background: rgba(0,0,255,0.2);
    border-radius: 4px;
}

/* Barra de tareas */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: #245EDC;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-sizing: border-box;
}

#start-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 32px;
    background: linear-gradient(to bottom, #4AA34F, #1E6A1E);
    color: white;
    border-radius: 4px;
    border: 1px solid #0A3A0A;
    cursor: pointer;
}

#start-button:hover { filter: brightness(1.1); }
#start-logo { width: 20px; margin-right: 5px; }

#taskbar-windows {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
}

#taskbar-windows button {
    height: 30px;
    padding: 0 5px;
    cursor: pointer;
    background: #E0E0E0;
    border: 1px solid #000;
}

#taskbar-windows button.active {
    background: #3399FF;
    color: white;
}

#taskbar-right {
    color: white;
    font-weight: bold;
}

/* Menú Inicio */
#start-menu {
    width: 300px;
    height: 400px;
    background: white;
    position: fixed;
    left: 5px;
    bottom: 40px;
    border: 2px solid #1E6A1E;
    display: flex;
    box-shadow: 0 0 10px black;
    z-index: 10;
    animation: fadeIn 0.2s ease;
}

.hidden { display: none; }

.start-menu-left { width: 30%; background: #245EDC; color: white; padding: 10px; }
.start-menu-right { width: 70%; background: #F0F0F0; padding: 10px; }
.start-menu-right ul { list-style: none; padding: 0; margin:0;}
.start-menu-right li { padding: 6px; cursor: pointer; }
.start-menu-right li:hover { background: #d0d0d0; }

/* Ventanas */
.window {
    width: 400px;
    height: 300px;
    background: #C0C0C0;
    position: absolute;
    top: 50px;
    left: 50px;
    border: 2px solid #000;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
    z-index: 20;
    resize: both;
    overflow: hidden;
    transition: transform 0.15s ease;
}

.title-bar {
    height: 25px;
    background: linear-gradient(to bottom, #000080, #0000CD);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    cursor: move;
}

.window-content {
    padding: 10px;
    background: white;
    height: calc(100% - 25px);
    overflow: auto;
}

.window-buttons button {
    width: 20px;
    height: 20px;
    margin-left: 2px;
    border: none;
    cursor: pointer;
}

.close-btn { background: #FF0000; color: white; }
.minimize-btn { background: #FFFF00; color: black; }
.maximize-btn { background: #00FF00; color: black; }

/* Papelera */
#recycle-bin.over { outline: 2px dashed red; }

/* Animación fade */
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
