/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #dc3545;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

header p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

.question-label {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.question-number {
    color: #dc3545;
    font-weight: bold;
    margin-right: 8px;
}

.required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 5px;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.radio-option:hover {
    background-color: #f0f0f0;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option span {
    font-size: 1em;
    cursor: pointer;
}

/* Personal Info Styles */
.personal-info {
    background-color: #e8f4f8;
    border-left: 4px solid #17a2b8;
}

.personal-info h3 {
    color: #17a2b8;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.input-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 250px;
}

.input-group .question-label {
    margin-bottom: 8px;
    font-size: 1em;
}

/* Input und Textarea Styles */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #dc3545;
}

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

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Submit Button Styles */
.submit-section {
    text-align: center;
    margin-top: 40px;
}

button[type="submit"] {
    background-color: #dc3545;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    min-width: 200px;
}

button[type="submit"]:hover {
    background-color: #c82333;
}

button[type="submit"]:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Styles */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .question {
        padding: 15px;
    }
    
    .question-label {
        font-size: 1em;
    }
    
    button[type="submit"] {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}

/* Validation Styles */
input:invalid,
textarea:invalid {
    border-color: #dc3545;
}

input:valid,
textarea:valid {
    border-color: #28a745;
}

/* Responsive Design für Input Groups */
@media (max-width: 600px) {
    .input-row {
        flex-direction: column;
    }
    
    .input-group {
        min-width: 100%;
    }
}

/* Focus Styles für Barrierefreiheit */
input:focus,
textarea:focus,
input[type="radio"]:focus,
button:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}