/* style.css - Optimización Final */
* { box-sizing: border-box; }
body { background: #008080; font-family: Arial, sans-serif; margin: 0; overflow: hidden; }
#desktop { position: relative; height: 100vh; width: 100vw; }

/* Visibilidad Crítica */
.window.closed, .window.minimizedWindow, .taskbarPanel.closed { display: none !important; }

.window {
    position: absolute; background: #CCC; border: 2px solid;
    border-color: #FFF #808080 #808080 #FFF; box-shadow: 1px 1px 0 #000;
    min-width: 250px; z-index: 1000;
}

/* Estilo para ventana maximizada */
.window.fullSizeWindow {
    width: 100% !important; height: calc(100% - 35px) !important;
    top: 0 !important; left: 0 !important;
}

.windowHeader {
    background: #808080; color: #FFF; display: flex;
    align-items: center; height: 30px; padding: 0 5px; cursor: move;
}
.activeWindow .windowHeader { background: #000080; }
.windowHeader strong { flex-grow: 1; font-size: 14px; }

.windowHeader span {
    width: 20px; height: 20px; background: #CCC; border: 2px solid;
    border-color: #FFF #808080 #808080 #FFF; color: #000;
    display: flex; justify-content: center; align-items: center;
    margin-left: 2px; cursor: pointer; font-weight: bold;
}

/* Dibujo del icono Maximizar */
.winmaximize span { width: 10px; height: 8px; border: 2px solid #000; border-top: 3px solid #000; }

.wincontent {
    background: #FFF; padding: 15px; border: 2px solid #808080;
    margin: 2px; height: calc(100% - 34px); overflow-y: auto;
}

/* Iconos de Nano Banana */
#icons { position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; gap: 20px; }
#icons a { display: flex; flex-direction: column; align-items: center; width: 80px; text-decoration: none; color: #FFF; text-shadow: 1px 1px #000; cursor: pointer; }
#icons a img { width: 48px; height: 48px; margin-bottom: 5px; }

/* Barra de Tareas (Z-INDEX SUPERIOR) */
#taskbar {
    position: fixed; bottom: 0; width: 100%; height: 35px;
    background: #CCC; border-top: 2px solid #FFF;
    z-index: 2000 !important; /* Siempre sobre las ventanas */
    display: flex; align-items: center; padding: 0 5px;
}

.taskbarPanel {
    padding: 2px 10px; margin-right: 5px; border: 2px solid;
    border-color: #FFF #808080 #808080 #FFF; font-size: 12px;
    cursor: pointer; background: #CCC; white-space: nowrap;
}
.taskbarPanel.activeTab { background: #EEE; border-color: #808080 #FFF #FFF #808080; }

#templateLink { position: absolute; bottom: 45px; right: 15px; font-size: 12px; color: rgba(255,255,255,0.7); text-decoration: none; }

@media screen and (max-width: 600px) {
    .window { width: 95% !important; left: 2.5% !important; }
    .wincontent { font-size: 16px !important; }
}