﻿html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#rq-level3-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    padding: 20px 10px 40px;
    box-sizing: border-box;
}

/* Intro-scherm */

.rq-intro {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    text-align: left;
}

    .rq-intro h2 {
        color: #00008B;
        margin-bottom: 20px;
        text-align: center;
    }

    .rq-intro p {
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .rq-intro .highlight {
        font-weight: bold;
        color: #00008B;
    }

/* Gamegedeelte */

.rq-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

    .rq-game h2 {
        color: #00008B;
        margin-bottom: 10px;
        text-align: center;
    }

#timerDisplay {
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
    color: #00008B;
}

/* Tabel / kwadrant */

table#kwadrant {
    border-collapse: collapse;
    margin: 20px auto;
    border: 10px solid #00008B;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    overflow: hidden;
}

    table#kwadrant td {
        width: 50px;
        height: 50px;
        text-align: center;
        vertical-align: middle;
        border: 1px solid #c0c0c0;
        font-family: monospace;
        font-size: 18px;
        position: relative;
        padding: 2px;
        box-sizing: border-box;
    }

.operant {
    background-color: #ffffff;
}

.operator {
    background-color: #dddddd;
}

.result {
    background-color: #cfc;
    min-width: 60px;
    font-weight: bold;
    padding: 0 5px;
}

.result-operator {
    background-color: #9cbf9c;
}

.final {
    background-color: #6fdd6f;
    font-weight: bold;
    min-width: 60px;
    padding: 0 5px;
}

.empty-cell {
    background-color: #00008B;
}

/* Verborgen cellen + input */

.hidden-cell {
    padding: 0;
}

.rq-input {
    width: 100%;
    height: 100%;
    border: 1px solid #ffe999;
    box-sizing: border-box;
    text-align: center;
    font-size: 18px;
    font-family: monospace;
    -webkit-box-shadow: none !important;
    -webkit-text-fill-color: #000 !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background-color: transparent;
}

    .rq-input.empty-input {
        background-color: #fffacd; /* lichte gele hint */
    }

    .rq-input.number-input-filled {
        background-color: #fffacd !important;
    }

    .rq-input.focused-input {
        outline: 2px solid #00008B;
        border-color: #00008B;
    }

    .rq-input::-webkit-inner-spin-button,
    .rq-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

/* Buttons */

.rq-btn {
    margin: 5px 8px;
    padding: 10px 22px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.05s ease;
    white-space: nowrap;
}

.rq-btn-primary {
    background-color: #00008B;
}

    .rq-btn-primary:hover {
        background-color: #00006b;
    }

.rq-btn-secondary {
    background-color: #555;
}

    .rq-btn-secondary:hover {
        background-color: #333;
    }

.rq-btn-success {
    background-color: #2e8b57;
}

    .rq-btn-success:hover {
        background-color: #256b44;
    }

.rq-btn:active {
    transform: scale(0.97);
}

.controls-game {
    margin: 20px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Feedback tekst */

.rq-feedback {
    margin-top: 10px;
    min-height: 24px;
    text-align: center;
    font-size: 0.95rem;
}

    .rq-feedback.ok {
        color: #2e8b57;
        font-weight: bold;
    }

    .rq-feedback.error {
        color: #b00000;
        font-weight: bold;
    }

/* Foutmarkering */

.error-highlight {
    background-color: #ff3333 !important;
    border: 2px solid #a00000 !important;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

/* Helpers */

.hidden {
    display: none !important;
}

/* Responsive */

@media (max-width: 768px) {
    table#kwadrant {
        transform: scale(0.9);
        transform-origin: center;
        width: 100%;
        overflow-x: auto;
        display: block;
    }

        table#kwadrant td {
            min-width: 30px !important;
            height: 40px !important;
            font-size: 16px;
            padding: 2px;
        }
}

@media (max-width: 480px) {
    .rq-btn {
        padding: 8px 14px;
        font-size: 14px;
    }
}
