/* Apple / iOS Glass Look – FIXED uitlijning */

:root {
    --bg: #f2f2f7;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.55);
    --text-main: #1c1c1e;
    --text-muted: #6e6e73;
    --accent: #007aff;
    --danger: #ff3b30;
    --radius: 18px;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

/* Belangrijk: zorgt dat padding + border NIET buiten het element tellen */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-family: var(--font-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

#app-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem 1rem;
}

.app-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
}

.app-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}

#main-card {
    background: var(--glass-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    width: 100%;
}

/* Secties */

section {
    width: 100%;
}

section h2 {
    margin-top: 0;
    margin-bottom: 0.9rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Rijen met velden */

.field-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
    width: 100%;
}

.field-row label {
    font-size: 0.9rem;
}

/* Inputs en textarea – netjes binnen de kaart */

input[type="text"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid #d1d1d6;
    background: #ffffff;
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio groep */

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Inline row (input + knoppen naast elkaar) */

.inline-row {
    display: flex;
    gap: 0.6rem;
    width: 100%;
}

.inline-row input[type="text"] {
    flex: 1 1 auto;
}

.inline-row button {
    flex: 0 0 auto;
}

/* Knoppen */

button {
    cursor: pointer;
    border-radius: 999px;
    border: none;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    background: #e5e5ea;
    color: var(--text-main);
    transition: opacity 0.2s, transform 0.05s;
}

button:hover {
    opacity: 0.85;
}

button:active {
    opacity: 0.75;
    transform: scale(0.98);
}

.primary-btn {
    background: var(--accent);
    color: #ffffff;
}

/* Berichtbox (ontsleutelde tekst) */

.message-box {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #d1d1d6;
    padding: 1rem 1.1rem;
    font-size: 1.02rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Checkboxregel */

.remember-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Divider */

.divider {
    border: none;
    border-top: 1px solid #e5e5ea;
    margin: 1.5rem 0;
}

/* Status / meldingen */

.status {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.status.error {
    color: var(--danger);
}

/* Footer */

.app-footer {
    margin-top: 1.2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* Utility */

.hidden {
    display: none !important;
}

/* Responsive */

@media (max-width: 600px) {
    #app-container {
        padding: 1.2rem 0.8rem 1.8rem 0.8rem;
    }

    #main-card {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .inline-row {
        flex-direction: column;
    }

    button {
        width: 100%;
        text-align: center;
    }
}

/* ========================= */
/*      DARK MODE (iOS)      */
/* ========================= */

@media (prefers-color-scheme: dark) {

    :root {
        --bg: #000000;
        --glass-bg: rgba(30, 30, 30, 0.55);
        --glass-border: rgba(255, 255, 255, 0.08);
        --text-main: #f5f5f7;
        --text-muted: #8e8e93;
        --accent: #0a84ff;
        --danger: #ff453a;
        --shadow: 0 8px 28px rgba(0,0,0,0.6);
    }

    body {
        background: #000000;
        color: var(--text-main);
    }

    #main-card {
        background: var(--glass-bg);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-color: var(--glass-border);
    }

    input[type="text"],
    input[type="password"],
    textarea {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.15);
        color: var(--text-main);
    }

    input:focus,
    textarea:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(10,132,255,0.25);
    }

    .message-box {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.15);
        color: var(--text-main);
    }

    button {
        background: rgba(255,255,255,0.12);
        color: var(--text-main);
    }

    .primary-btn {
        background: var(--accent);
        color: white;
    }

    .divider {
        border-top-color: rgba(255,255,255,0.12);
    }

    .status {
        color: var(--text-muted);
    }

    .status.error {
        color: var(--danger);
    }
}

#help-icon {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
    z-index: 9999;
    transition: background 0.2s, transform 0.15s;
}

#help-icon:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.05);
}

/* Dark mode variant */
@media (prefers-color-scheme: dark) {
    #help-icon {
        background: rgba(40,40,40,0.65);
        border-color: rgba(255,255,255,0.15);
        box-shadow: 0 4px 18px rgba(0,0,0,0.6);
        color: #f5f5f7;
    }

    #help-icon:hover {
        background: rgba(60,60,60,0.8);
    }
}

.rainbow-link {
    text-decoration: none; /* geen underline */
    font-weight: bold;
    display: inline-block;
}

.rainbow-link span {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Kleuren in mooie volgorde */
.rainbow-link span:nth-child(1) { color: #7b2cbf; } /* paars */
.rainbow-link span:nth-child(2) { color: #ffb703; } /* donkergeel */
.rainbow-link span:nth-child(3) { color: #219ebc; } /* blauw */
.rainbow-link span:nth-child(4) { color: #fb8500; } /* oranje */
.rainbow-link span:nth-child(5) { color: #2a9d8f; } /* groen */
.rainbow-link span:nth-child(6) { color: #9d4edd; } /* paars variant */
.rainbow-link span:nth-child(7) { color: #ff9f1c; } /* warme oranje/geel */

/* Optioneel: kleine hover-animatie */
.rainbow-link:hover span {
    transform: translateY(-3px);
}

a.back-link {
            display: inline-block;
            margin-top: 1rem;
            color: var(--accent);
            font-weight: 600;
            text-decoration: none;
        }
