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

:root {
    --primary-color: #2d8659;
    --primary-dark: #1f5d3f;
    --secondary-color: #4a9d73;
    --accent-color: #6bc497;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px 10px;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 300;
}

form {
    padding: 30px 20px;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--bg-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-color);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    margin-top: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    line-height: 1.5;
}

/* Captcha Styles */
.captcha-container {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.captcha-question {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    min-height: 60px;
}

.refresh-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.refresh-btn:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

.refresh-btn:active {
    transform: rotate(180deg);
}

/* Submit Button */
.submit-container {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Nur im Dev-Modus sichtbar (wird per JS eingeblendet wenn DEV_MODE) */
.test-btn.dev-only {
    display: none !important;
}

.test-btn {
    background: #6c757d;
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.test-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid var(--success-color);
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid var(--error-color);
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px 5px;
    }

    header {
        padding: 25px 15px;
    }

    header h1 {
        font-size: 24px;
    }

    form {
        padding: 20px 15px;
    }

    .form-section h2 {
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    .captcha-question {
        font-size: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .submit-btn {
        padding: 14px 30px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    header h1 {
        font-size: 22px;
    }

    .captcha-question {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
    }

    .submit-container,
    .captcha-container {
        display: none;
    }
}
