/* Globale Stile und Responsiveness */
:root {
    --primary-color: #333333; /* Ein schönes, einladendes Blau */
    --accent-color: #7dadc8; /* Orange für Akzente */
    --error-color: #f44336; /* Rot für Fehler */
    --text-color: #333333;
    --background-color: #ffffff;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5; /* Leichter grauer Hintergrund */
}

/* --- Header & Banner --- */
.header {
    background-image: url('bg-bunner-2.jpg'); /* Das Pusteblume-Foto */
    background-size: cover;
    background-position: center 30%; /* Pusteblume etwas höher setzen */
    height: 300px; /* Höhe für Desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Overlay für bessere Lesbarkeit */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Dunkles, leicht transparentes Overlay */
    backdrop-filter: blur(2px);
}

.header-content {
    position: relative;
    z-index: 10;
    color: var(--background-color); /* Weißer Text */
    padding: 20px;
}

.header-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
}


/* --- Main Container und Layout --- */
.container {
    max-width: 900px; /* Maximale Breite der Inhalte */
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr; /* Standard: Einspaltig */
    gap: 40px;
}

@media (min-width: 768px) {
    .container {
        grid-template-columns: 2fr 1fr; /* Desktop: Formular links, Regeln rechts */
    }
}

/* --- Formular Bereich --- */
.form-section {
    background: var(--background-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    order: 1; /* Auf Desktop links */
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 15px;
}

.form-icon {
    width: 90px;
    height: 90px;
    border: 0px solid var(--primary-color);
    border-radius: 50%;
    padding: 5px;
}

/* --- Formular Elemente --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
    outline: none;
}

/* Stil für ungültige Felder */
.form-group.error input,
.checkbox-group.error input {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
}

.validation-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* Wird per JS bei Fehler eingeblendet */
}

/* --- Checkbox Gruppe --- */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    /* Standard-Checkbox ausblenden und eigenes Design verwenden */
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #999;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✔';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-group label {
    font-size: 0.95rem;
    cursor: pointer;
    flex-grow: 1;
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* --- Submit Button --- */
.submit-button {
    width: 100%;
    padding: 15px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px; /* Großer, deutlicher Button */
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    background-color: #ffb74d; /* Helleres Orange */
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.3);
}

.submit-button:active {
    transform: translateY(2px);
}

/* --- Erfolgsmeldung --- */
.message {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
}

#successMessage {
    background-color: #e8f5e9; /* Helles Grün */
    color: #4caf50; /* Dunkelgrüner Text */
    border: 1px solid #c8e6c9;
}

.success-hidden {
    display: none;
}

/* --- Regeln Bereich --- */
.rules-section {
    background: #ffffff; /* Weißer Hintergrund für diesen Abschnitt */
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    order: 2; /* Auf Desktop rechts */
}

.rules-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.rules-section ul {
    list-style-type: '👉 ';
    padding-left: 20px;
    margin-bottom: 20px;
}

.rules-section li {
    margin-bottom: 10px;
}

.rules-note {
    font-style: italic;
    font-size: 0.9rem;
    padding: 10px;
    border-left: 4px solid var(--accent-color);
    background-color: #c9e1ef; /* Sehr heller gelblicher Hintergrund */
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    background-color: #333;
    color: #ccc;
    font-size: 0.9rem;
}

.footer a {
    color: #eee;
    text-decoration: none;
    margin: 0 5px;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- Responsiveness für kleinere Screens --- */
@media (max-width: 600px) {
    .header {
        height: 200px;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .form-section, .rules-section {
        padding: 20px;
    }

    .submit-button {
        font-size: 1rem;
    }
}