/* GLOBAL */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    background: #b5c99a;
    font-family: system-ui, sans-serif;
}

/* MAIN LAYOUT – TWO COLUMNS */
.layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding: 40px;
    gap: 350px;
    align-items: center;
    justify-content: center;
}

/* LEFT PANEL (RULES IMAGE) */
.left-panel {
    width: 420px;
    display: flex;
    justify-content: center;
}
.left-panel img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* RIGHT PANEL (CANVAS + BUTTONS) */
.right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 520px;
}

/* CANVAS */
#life-canvas {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: #000;
}

/* WEBGPU REPLACEMENT — SAME SIZE AS CANVAS */
.webgpu-replacement {
    display: none;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid #b30000;
    background: #fff5f5;
    color: #b30000;
    font-size: 16px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* BUTTONS */
.control-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}
button {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 16px 24px;
    min-width: 150px;
    border-radius: 10px;
    border: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #15883e;
    color: #fff;
    transition: 0.3s;
}
button:hover {
    background: #0f602d;
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* FOOTER */
.footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
}
.footer a {
    color: #15883e;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #15883e;
    border-radius: 5px;
    background: #fff;
    transition: 0.3s;
}
.footer a:hover {
    background: #15883e;
    color: #fff;
}

/* UTILITY */
.hidden {
    display: none !important;
}
.webgpu-msg {
    max-width: 80%;
    text-align: center;
    line-height: 1.5;
    color: #b30000;
    font-size: 16px;
}

.webgpu-msg h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #b30000;
}

.webgpu-msg code {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    background: #ffeded;
    border-radius: 4px;
    border: 1px solid #d88;
    font-size: 14px;
}
.page-title {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;

    font-size: 32px;
    font-weight: 800;

    margin: 0;
    padding: 18px 0;

    background: #b5c99a; /* same as page background */
    z-index: 9999;       /* above all other elements */
    color: #1a1a1a;
}