* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    padding: 20px;
    color: #68615D;
    overflow-x: hidden;
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- Header ---------- */

.beginwoord {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ebebeb;
    color: #2f2f2f;
}

.beginwoord h1 {
    color: #b58e36;
    font-family: "Broadway W03 Engraved", serif;
}

.italic { font-style: italic; }
.bold   { font-weight: bold; color: black !important; }

/* ---------- Naam input ---------- */

.inputcontainer {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inputcontainer label {
    font-weight: bold;
}

/* ---------- Letters & dropzone ---------- */

fieldset {
    margin-top: 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
}

fieldset legend {
    padding: 0 6px;
    font-weight: bold;
    color: #b58e36;
}

#letters, #dropzone {
    min-height: 70px;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.letter {
    background-color: #faead1;
    border-radius: 4px;
    box-shadow: inset 0 0 13px #e7d8c1;
    padding: 10px;
    font-size: 40px;
    font-weight: bold;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.letter:active { cursor: grabbing; }

.letter.drag-source { opacity: 0.35; }

.letter.space {
    background-color: #f0e2c4;
    color: #b58e36;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter.space svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    pointer-events: none;
}

.dragging {
    opacity: 0.7;
    pointer-events: none;
}

.rood  { color: red; }
.groen { color: green; }

/* ---------- Buttons ---------- */

.extraChars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.addCharBtn,
.resetBtn {
    padding: 6px 12px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #faead1;
    color: #b58e36;
    cursor: pointer;
    font-size: 14px;
}

.addCharBtn:hover,
.resetBtn:hover {
    background: #e7d8c1;
}

.verzenden {
    margin-top: 16px;
    padding: 8px 20px;
    border: 1px solid #C2BFB3;
    border-radius: 4px;
    background: white;
    color: #68615D;
    font-size: 14px;
    cursor: pointer;
}

.verzenden:hover {
    color: white;
    background-color: #68615D;
}

.verzenden:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---------- Form ---------- */

.input {
    width: 100%;
    padding: 8px;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 14px;
}

.input:focus {
    outline: none;
    border-color: #b58e36;
    box-shadow: 0 0 0 2px rgba(181, 142, 54, 0.2);
}

#wordInput {
    flex: 1;
    min-width: 200px;
    width: auto;
}

.formulier {
    margin-top: 32px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row.duo {
    flex-direction: row;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.field label {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

.error {
    color: #d33;
    font-size: 13px;
    margin-top: 4px;
    min-height: 1em;
}

@media (max-width: 600px) {
    .form-row.duo {
        flex-direction: column;
    }
}

/* ---------- Bedankt page ---------- */

body.bedankt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#bedankTekst {
    flex: 1;
    max-width: 600px;
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#bedankTekst h2 {
    color: #b58e36;
    margin-bottom: 1rem;
    text-align: center;
}

.voorwoord {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.gedicht {
    font-family: 'Garamond', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: black;
    margin: 2rem 0;
    line-height: 1.8;
}

.image {
    width: 100%;
    height: auto;
    margin-top: 1.5rem;
    border-radius: 6px;
}

.info {
    display: flex;
    flex-direction: column;
    align-items: center;
}
