* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 50% -10%,
            #263364 0%,
            #10162f 40%,
            #03050c 100%
        );
}

.container {
    width: 96%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0 35px;
}

h1 {
    margin: 0;
    text-align: center;

    font-size:
        clamp(32px, 5vw, 55px);
}

.subtitle {
    max-width: 900px;

    margin:
        12px auto 35px;

    color: #a2acc7;

    text-align: center;

    font-size: 15px;

    line-height: 1.6;
}

.mazes {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.card {
    padding: 14px;

    border-radius: 20px;

    background:
        rgba(8, 13, 30, .94);

    border:
        1px solid
        rgba(255, 255, 255, .08);

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, .40);
}

.card h2 {
    margin: 0 0 8px;

    font-size: 25px;
}

.human h2 {
    color: #4db3ff;
}

.quantum h2 {
    color: #df60ff;
}

.description {
    min-height: 48px;

    margin-bottom: 15px;

    color: #8d98b6;

    font-size: 14px;

    line-height: 1.5;
}

canvas {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 10px;

    background: #02040b;

    image-rendering: pixelated;
}

.stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 7px;

    margin-top: 14px;
}

.stat {
    padding: 10px 4px;

    text-align: center;

    border-radius: 9px;

    background: #070b18;
}

.label {
    display: block;

    margin-bottom: 4px;

    color: #68738f;

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: .5px;
}

.value {
    font-size: 15px;

    font-weight: bold;
}

.mode-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.card-mode-group {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mode-group-title {
    width: 100%;
    color: #8f9ab8;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.mode-button {
    padding: 11px 24px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #aeb8d4;
    background: rgba(8, 13, 30, .86);
    box-shadow: none;
    font-size: 14px;
}

.mode-button.active {
    color: #ffffff;
    border-color: rgba(151, 102, 255, .65);
    background: linear-gradient(135deg, #5366f4, #a847ef);
    box-shadow: 0 8px 28px rgba(120, 70, 255, .25);
}

button:disabled {
    opacity: .42;
    cursor: not-allowed;
    box-shadow: none;
}

.mode-note {
    width: 100%;
    margin-top: -3px;
    color: #7884a4;
    text-align: center;
    font-size: 12px;
}

.controls {
    margin-top: 30px;

    text-align: center;
}

button {
    padding: 14px 32px;

    border: 0;

    border-radius: 50px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #5366f4,
            #a847ef
        );

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

    box-shadow:
        0 10px 35px
        rgba(120, 70, 255, .30);
}

.legend {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 22px;

    margin-top: 25px;

    color: #8d98b5;

    font-size: 13px;
}

.dot {
    display: inline-block;

    width: 10px;
    height: 10px;

    margin-right: 6px;

    border-radius: 50%;
}

.blue {
    background: #37adff;
}

.purple {
    background: #db5cff;
}

.green {
    background: #45ff9a;
}

.red {
    background: #ff4c6b;
}

@media (max-width: 900px) {

    .mazes {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

/* Keuzeknoppen: mens en computer gebruiken dezelfde compacte maat. */
.card .mode-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
}

.card .mode-group-title {
    grid-column: 1 / -1;
}

.card .mode-button {
    width: 100%;
    min-width: 0;
    padding: 8px 5px;
    font-size: 10px;
    line-height: 1.05;
    white-space: nowrap;
}

/* De twee computerkeuzes nemen elk dezelfde breedte in als twee mensknoppen samen. */
.card.quantum .mode-button {
    grid-column: span 2;
}

@media (max-width: 560px) {
    .card .mode-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card.quantum .mode-button {
        grid-column: span 1;
    }
}
