/* SPDX-License-Identifier: MIT */
/* File: styles.css */

/* Basis layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: url("images/background.jpg") no-repeat center center fixed;
    background-size: cover;
    text-align: center;
    padding: 2rem;
    color: #333;
    position: relative;
}

/* Witte overlay met opacity om de foto zachter te maken */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    z-index: -1;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Titel */
h1 {
    color: #333;
    margin-bottom: 1rem;
}

/* Algemene tekst */
p {
    font-size: 1.1rem;
    margin: 1rem 0;
}

/* Knoppen */
button {
    margin: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid #3e8e41;
    border-radius: 8px;
    background: linear-gradient(to bottom, #4CAF50, #3e8e41);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px #2d6a31;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

button:hover {
    background: linear-gradient(to bottom, #45a049, #2d6a31);
    transform: translateY(-2px);
    box-shadow: 0 5px #2d6a31;
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 2px #2d6a31;
}

button.secondary {
    border-color: #b5b5b5;
    background: linear-gradient(to bottom, #efefef, #dddddd);
    color: #333;
    box-shadow: 0 3px #b5b5b5;
}

button.secondary:hover {
    background: linear-gradient(to bottom, #f6f6f6, #d7d7d7);
}

/* Letters overzicht */
.letters {
    margin-top: 2rem;
}

.letters .letter {
    font-size: 1.8rem;
    margin: 0.4rem;
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background-color: #ffe680;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    user-select: none;
}

.letters .letter:hover {
    background-color: #ffcc00;
    transform: scale(1.08);
}

.letters sub {
    font-size: 0.8rem;
    color: #555;
    margin-left: 0.2rem;
}

/* Feedback */
.letters .letter.correct {
    background-color: #c8f7c5;
}
.letters .letter.wrong {
    background-color: #f7c5c5;
}

/* Vraag layout */
.question {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.question img {
    max-width: 300px;   /* verbeterd: afbeeldingen nooit groter dan 300px */
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Multiple choice opties */
.options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

/* Order-vragen */
.order-question {
    margin-top: 1rem;
}

.order-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px auto;
    max-width: 720px;
}

/* Items */
.order-item {
    padding: 8px 12px;
    background-color: #fff8dc;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s, outline 0.2s;
    user-select: none;
}

.order-item:hover {
    background-color: #ffe680;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.18);
}

.order-item.selected-item {
    outline: 3px solid #2196f3;
    background-color: #eef6ff;
}

/* Correct geplaatste items */
.order-item.correct {
    background-color: #c8f7c5;   /* lichtgroen */
    border-color: #4CAF50;       /* groene rand */
    font-weight: bold;
    color: #2d6a31;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Inserthokjes */
.drop-slot {
    width: 18px;
    height: 26px;
    border: 2px dashed #bcbcbc;
    border-radius: 6px;
    background: #ffffff;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
    user-select: none;
}

.drop-slot:hover {
    border-color: #8f8f8f;
    transform: scale(1.06);
}

.drop-slot-highlight {
    border-color: #3b82f6;
}

.drop-slot-last {
    margin-left: 2px;
}

/* Actieknoppen */
.actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Animatie feedback */
.order-question li.just-dropped {
    animation: flash 0.8s ease;
}

@keyframes flash {
    0%   { background-color: #fff176; }
    50%  { background-color: #fffde7; }
    100% { background-color: inherit; }
}

/* Responsief gedrag */
@media (max-width: 720px) {
    .options {
        flex-direction: column;
        align-items: stretch;
    }
    .options button {
        width: 100%;
    }
    .order-list {
        gap: 6px;
        max-width: 100%;
    }
    .order-item {
        min-width: 100px;
        padding: 10px;
    }
    .question img {
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1.2rem;
    }
    .order-item {
        min-width: 92px;
        font-size: 0.95rem;
    }
    .drop-slot {
        width: 16px;
        height: 24px;
    }
    .question img {
        max-width: 180px;
    }
}

