@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --action-color: #2ecc71;
    --warning-color: #e74c3c;
    --ef-color: #9b59b6; 
    --movement-color: #f39c12;
    --taal-color: #16a085;
    --tech-lezen-color: #1abc9c; 
    --background-color: #ecf0f1;
    --text-color: #333;
    --light-color: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px; 
}

h1 {
    margin-top: 0; 
    margin-bottom: 20px;
    text-align: center;
}

h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 0.5rem;
}
h4 { font-size: 1rem; margin-bottom: 0.5rem; }

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.controls {
    background: var(--light-color);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1400px; 
    text-align: left;
    margin-bottom: 20px;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

.controls-columns {
    display: flex;
    gap: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.column {
    flex: 1;
    padding: 0 15px;
    border-right: 1px solid #e0e0e0;
}

.column:last-child {
    border-right: none;
}


textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-bottom: 15px;
    resize: vertical;
}

.upload-label, .download-btn {
    display: block; width: 100%; background: var(--secondary-color); color: var(--light-color);
    padding: 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
    text-align: center; margin-bottom: 10px; transition: background 0.3s ease; text-decoration: none;
}
.upload-label:hover, .download-btn:hover { background: #2980b9; }
.download-btn { background: #7f8c8d; }
.download-btn:hover { background: #6c7a7b; }

.option-group {
    display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 1rem; background-color: #f8f9f9; padding: 10px; border-radius: 8px;
}
.option-group label { display: flex; align-items: center; gap: 5px; }

.table-selection { padding-top: 1rem; }
.checkbox-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 10px; margin-bottom: 1rem;
}
.checkbox-grid label { font-size: 0.9rem; display: flex; align-items: center; gap: 5px; }

.generate-btn {
    width: 100%; background: var(--action-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background 0.3s ease; 
}
.generate-btn:hover { background: #27ae60; }

.button-group-4-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.preset-btn {
    background: #95a5a6; color: var(--light-color); border: none; padding: 12px; border-radius: 8px;
    cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.3s ease, box-shadow 0.3s ease;
}
.preset-btn:hover { background: #7f8c8d; }

/* NIEUWE STIJL VOOR GESELECTEERDE KNOP */
.preset-btn.selected {
    background: var(--secondary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.ef-selection-grid {
    display: grid; grid-template-columns: 1fr; gap: 10px; background-color: #f8f9f9;
    padding: 10px; border-radius: 8px; margin-bottom: 1rem;
}
.ef-selection-grid label { display: flex; align-items: center; gap: 5px; }

.ef-btn {
    width: 100%; background-color: var(--ef-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.3s ease;
}
.ef-btn:hover { background-color: #8e44ad; }

.movement-btn {
    width: 100%; background-color: var(--movement-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.3s ease;
}
.movement-btn:hover { background-color: #e67e22; }

.taal-btn {
    width: 100%; background-color: var(--taal-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.3s ease;
}
.taal-btn:hover { background-color: #117a65; }

.tech-lezen-btn {
    width: 100%; background-color: var(--tech-lezen-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 16px; font-weight: 600; transition: background-color 0.3s ease;
}
.tech-lezen-btn:hover { background-color: #16a085; }


.action-btn {
    width: 100%; background: var(--action-color); color: var(--light-color); border: none;
    padding: 15px; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: 700;
    transition: background 0.3s ease; margin-top: 1.5rem;
}
.action-btn:hover { background: #27ae60; }

.warning-btn {
    background-color: var(--warning-color); color: var(--light-color); border: none; padding: 12px;
    border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.3s ease;
}
.warning-btn:hover { background: #c0392b; }

.wheel-wrapper {
    position: relative; width: 650px; height: 650px;
    display: flex; justify-content: center; align-items: center;
}
#wheelCanvas {
    width: 100%; height: 100%; transition: transform 8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pointer {
    position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 20px solid transparent;
    border-right: 20px solid transparent; border-top: 30px solid var(--warning-color); z-index: 10;
}
#spinBtn {
    position: absolute; width: 100px; height: 100px; background: var(--light-color);
    color: var(--primary-color); border: 8px solid var(--light-color); border-radius: 50%;
    font-size: 20px; font-weight: 700; cursor: pointer; z-index: 5;
    box-shadow: 0 0 10px rgba(0,0,0,0.2); transition: transform 0.2s ease, background 0.3s;
}
#spinBtn:active { transform: scale(0.95); }
#spinBtn:disabled { cursor: not-allowed; background-color: #ccc; }

.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center;
}
.modal-content {
    background: var(--light-color); padding: 40px; border-radius: 15px; text-align: center;
    position: relative; box-shadow: 0 5px 25px rgba(0,0,0,0.3); max-width: 90%;
}
#resultOutput { 
    font-size: 2.5rem; font-weight: 700; color: var(--secondary-color); min-height: 100px;
}
#resultOutput img { max-width: 120px; max-height: 120px; margin: 10px; }
.close-btn {
    position: absolute; top: 15px; right: 25px; font-size: 35px; font-weight: bold; color: #aaa; cursor: pointer;
}
.timer-bar-container {
    display: none; width: 100%; height: 20px; background-color: #e0e0e0; border-radius: 10px;
    margin-top: 20px; overflow: hidden;
}
.timer-bar { width: 100%; height: 100%; background-color: var(--action-color); border-radius: 10px; }
.manual-tip { font-size: 1rem; font-style: italic; font-weight: 400; color: #7f8c8d; margin-top: 20px; }
.menu-button {
    position: fixed; top: 20px; left: 20px; background-color: #2c3e50; color: #ffffff;
    padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); z-index: 1001;
}
.menu-button:hover { background-color: #34495e; }

/* --- GECORRIGEERDE STIJLEN VOOR WEERGAVEN --- */
.controls,
.main-content,
#wheelViewControls {
    display: none;
}

#downloadListBtn {
    display: none; 
}

body.options-view .controls {
    display: block;
}

body.wheel-view .main-content {
    display: flex;
}

body.wheel-view #wheelViewControls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}
/* --- EINDE STIJLEN --- */

@media (max-width: 1450px) { 
    .controls-columns {
        flex-direction: column;
    }
    .column {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    .column:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .wheel-wrapper {
        width: 90vw; height: 90vw; max-width: 500px; max-height: 500px; min-width: unset;
    }
    .controls { max-height: 80vh; width: 90%; }
    #wheelCanvas { width: 100%; height: 100%; }
    .button-group-4-cols { grid-template-columns: 1fr 1fr; }
    #spinBtn { width: 80px; height: 80px; font-size: 16px; }
    #resultOutput { font-size: 2rem; }
    .pointer { border-left-width: 15px; border-right-width: 15px; border-top-width: 25px; }
}
/* 'Keuzemenu' knop verbergen in de rad-weergave */
body.wheel-view .menu-button {
    display: none;
}