/* Body and canvas */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
    margin: 0;
    padding: 0;
}

/* Flex container for canvas and UI */
#mainLayout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    margin-top: 32px;
}

/* Canvas styling for flex layout */
#gameWorld {
    margin: 0;
    flex: 1 1 auto;
    max-width: 70vw;
    height: auto;
}

/* UI floats right of canvas */
#ui {
    max-width: 320px;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 12px;
    flex: 0 0 320px;
    position: sticky;
    top: 32px;
}



/* Section spacing */
#initial, #parameters, #controls {
    border-radius: 8px;
    background-color: lavenderblush;
    padding: 16px;
    margin-bottom: 24px;
}

#runName {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    border-radius: 6px;
    background-color: rgb(252, 225, 234);
    color: #d32f2f;
    text-align: center;
}

/* Labels and inputs */
label {
    display: block;
    margin-bottom: 0px;
    font-weight: 500;
    color: #455a64;
}

input[type="number"], input[type="checkbox"] {
    margin-bottom: 16px;
}

input[type="number"] {
    border: 1px solid #b0bec5;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

input[type="checkbox"] {
    accent-color: #4fc3f7;
    margin-right: 8px;
    transform: scale(1.2);
}

/* Button styling */
button {
    background: #4fc3f7;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
button:hover {
    background: #0288d1;
}

/* Default style */
.db-status {
    border: 1px solid #000;
    background-color: darkgrey;
    text-align:center;
    border-radius: 6px;
}

/* Connected state (green background) */
.db-connected {
    background-color: lightgreen;
    
}

/* Disconnected state (red background) */
.db-disconnected {
    background-color: lightcoral;
}

/* Responsive for smaller screens */
@media (max-width: 900px) {
    #mainLayout {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    #ui {
        max-width: 100%;
        width: 100%;
        position: static;
        margin-top: 24px;
    }
    #gameWorld {
        max-width: 100vw;
    }
}