body{
    margin:0;
    overflow:hidden;
    background:#111;
    color:#ddd;
    font-family:Arial,sans-serif;
}

#life01{
    width:100vw;
    height:100vh;
    display:block;
}

#topBar{
    position:fixed;
    top:10px;
    left:10px;
    right:10px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    z-index:20;
}

.back-btn,
.panel,
input,
select,
button,
.matrix-label,
.matrix-corner,
.matrix-input{
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
    border-radius:6px;
}

.back-btn{
    padding:6px 10px;
    text-decoration:none;
    background:rgba(10,10,20,.8);
    backdrop-filter:blur(12px);
}

#stats{
    position:fixed;
    top:10px;
    right:58px;
    padding:8px 12px;
    background:rgba(10,10,20,.8);
    backdrop-filter:blur(12px);
    border:1px solid rgba(255,255,255,.12);
    border-radius:999px;
    font-size:12px;
    color:rgba(255,255,255,.75);
    z-index:20;
}

.icon-btn{
    width:38px;
    height:38px;
    padding:0;
    background:rgba(10,10,20,.8);
    backdrop-filter:blur(12px);
}

#controls{
    position:fixed;
    top:60px;
    left:10px;
    width:280px;
    max-height:calc(100vh - 80px);
    overflow-y:auto;
    z-index:15;
}

.panel{
    margin-bottom:10px;
    padding:10px;
    background:rgba(10,10,20,.8);
    backdrop-filter:blur(12px);
}

.panel h2{
    margin:0 0 10px;
    font-size:14px;
    font-weight:600;
}

.panel-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

input,
select,
button{
    width:100%;
    margin:4px 0;
    padding:8px;
    box-sizing:border-box;
    background:#111;
}

button{
    cursor:pointer;
    transition:.15s;
}

button:hover,
.back-btn:hover{
    background:#1b1b1b;
}

#matrixContainer{
    overflow:auto;
    max-height:450px;
}

.matrix-grid{
    display:grid;
    gap:2px;
    width:max-content;
}

.matrix-label,
.matrix-corner{
    display:flex;
    align-items:center;
    justify-content:center;
    height:32px;
    background:#111;
    font-size:12px;
    font-weight:600;
}

.matrix-input{
    width:80px;
    height:32px;
    margin:0;
    padding:0;
    text-align:center;
    background:#111;
    border:none;
}

#helpPanel{
    position:fixed;
    top:60px;
    right:10px;
    width:260px;
    z-index:30;
}

#helpPanel p{
    margin:0 0 10px;
    line-height:1.5;
    opacity:.8;
}

#helpPanel ul{
    margin:0;
    padding-left:18px;
    opacity:.8;
}

.close-btn{
    width:32px;
    height:32px;
    padding:0;
}

.hidden{
    display:none;
}

#simControls{
    position:fixed;
    bottom:20px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    align-items:center;
    gap:12px;
    z-index:100;
}

.sim-btn{
    width:auto;
    padding:0;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(15,15,15,.75);
    cursor:pointer;
    transition:.15s;
}

#simControls .sim-btn{
    width:69px;
    height:69x;
    border-radius:50%;
    font-size:28px;
}

#pauseBtn{
    width:69px;
    height:69px;
    font-size:36px;
}

#controls::-webkit-scrollbar,
#matrixContainer::-webkit-scrollbar{
    width:8px;
    height:8px;
}

#controls::-webkit-scrollbar-thumb,
#matrixContainer::-webkit-scrollbar-thumb{
    background:#333;
    border-radius:999px;
}