/* === Base === */
body, html{
    margin:0;
    padding:0;
    height:100%;
    font-family:Arial, sans-serif;
    background:black;
    color:white;
    overflow:hidden;
}

#universe{
    display:flex;
    height:100%;
    position:relative;
    z-index:1;
}

/* === Sidebar === */
#sidebar{
    width:60px;
    background:rgba(0,0,0,0.7);
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:10px 0;
    z-index:2;
}
#sidebar button{
    background:transparent;
    border:none;
    color:white;
    font-size:28px;
    margin:10px 0;
    cursor:pointer;
    transition: transform 0.2s;
}
#sidebar button:hover{ transform:scale(1.3); }

/* === Ventanas === */
.window{
    position:absolute;
    width:300px;
    max-width:90%;
    height:300px;
    max-height:80%;
    background:rgba(20,20,40,0.95);
    border:2px solid #444;
    border-radius:8px;
    display:flex;
    flex-direction:column;
    z-index:10;
    opacity:0;
    transform:scale(0.7);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.window.show{
    opacity:1;
    transform:scale(1);
}
.titlebar{
    background:rgba(40,40,60,1);
    padding:5px;
    cursor:move;
    user-select:none;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.titlebar .close{ cursor:pointer; }

/* === Inputs === */
textarea, input{
    flex:1;
    width:calc(100% - 10px);
    margin:5px;
    padding:5px;
    border-radius:4px;
    border:none;
    background:#222;
    color:white;
    font-size:14px;
}

/* === Calculadora === */
#calcButtons{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap:5px;
    margin:5px;
}
#calcButtons button{
    width:100%;
    padding:15px 0;
    font-size:18px;
    cursor:pointer;
    border:none;
    border-radius:6px;
    background:#333;
    color:white;
    transition:0.2s;
}
#calcButtons button:hover{ background:#555; }

/* === Chat === */
#chatMessages{
    flex:1;
    overflow-y:auto;
    background:#111;
    margin:5px;
    padding:5px;
    border-radius:4px;
}
#chatInput{ margin:5px; }

/* === Agenda === */
#agendaList{ margin:5px; padding-left:20px; }

/* === Mini Juego === */
#gameArea{
    position:relative;
    width:100%;
    height:150px;
    background:#111;
    margin:5px 0;
    border-radius:4px;
}
#circle{
    width:50px;
    height:50px;
    background:red;
    border-radius:50%;
    position:absolute;
    top:50px;
    left:50px;
    cursor:pointer;
    transition:0.2s;
}

/* === Canvas === */
canvas{
    position:fixed;
    top:0;
    left:0;
    z-index:0;
}

/* === Botón de sonido === */
.sound-btn{
    position:fixed;
    top:10px;
    right:10px;
    z-index:1000;
    font-size:16px;
    padding:5px 10px;
    cursor:pointer;
}

/* === Responsivo === */
@media(max-width:768px){
    #sidebar{
        width:100%;
        height:60px;
        flex-direction:row;
        padding:0 10px;
        justify-content:space-around;
    }
    #sidebar button{
        font-size:24px;
        margin:0;
    }
    #calcButtons button{
        padding:12px 0;
        font-size:16px;
    }
    textarea, input{
        font-size:12px;
    }
}