/* CSS Reset und Grundlagen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3eab37;
    --primary-dark: #2d8028;
    --primary-light: #5bc052;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --background-color: #ffffff;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2d7a2d 0%, #3eab37 80%, #5bc85b 100%); /* Umgekehrter Farbverlauf: dunkel links, hell rechts */
    color: white;
    padding: 2rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem; /* Abstand zwischen Logo und Text */
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    justify-content: center; /* Zentriert den gesamten Header-Content */
}

.logo {
    height: 125px; /* Vergrößertes Logo */
    width: auto;
    flex-shrink: 0;
    /* Filter entfernt für Originalfarben */
}

.header-text {
    text-align: left; /* Links ausgerichtet neben dem Logo */
}

.main-title {
    font-size: 4rem; /* Vergrößerte Schriftgröße */
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.65rem; /* Vergrößerte Schriftgröße */
    font-weight: 300;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--background-color);
    padding: 3rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
}

.welcome-content h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.info-box {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-box ul {
    list-style: none;
    text-align: left;
}

.info-box li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.info-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Progress Bar */
.progress-container {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Question Container */
.question-container {
    background: var(--background-color);
    padding: 3rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: center;
}

.answers-container {
    display: grid;
    gap: 1rem;
}

.answer-option {
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(62, 171, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.answer-option input[type="radio"] {
    display: none;
}

.answer-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
}

.answer-letter {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.answer-option.selected .answer-letter {
    background: white;
    color: var(--primary-color);
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Email Screen */
.email-content {
    max-width: 600px;
    margin: 0 auto;
    background: var(--background-color);
    padding: 3rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.email-content h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.email-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.email-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.email-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.email-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(62, 171, 55, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem; /* Größerer Abstand */
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px !important; /* Feste Größe erzwingen */
    height: 24px !important; /* Feste Größe erzwingen */
    min-width: 24px; /* Mindestbreite sicherstellen */
    min-height: 24px; /* Mindesthöhe sicherstellen */
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition);
    background: white;
    display: inline-block; /* Explizite Darstellung */
    box-sizing: border-box; /* Border in Größe einbeziehen */
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    width: 24px !important; /* Größe auch im checked Zustand beibehalten */
    height: 24px !important; /* Größe auch im checked Zustand beibehalten */
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1; /* Verhindert Layout-Verschiebungen */
}

/* Results Screen */
.results-content {
    max-width: 1000px;
    margin: 0 auto;
}

.results-content h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.results-summary {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    text-align: center;
}

.results-summary h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.dominant-type {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
}

.chart-container {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
    max-width: 1000px; /* Gleiche Breite wie Results-Summary */
    height: 700px; /* Größere Höhe für bessere Diagramm-Darstellung */
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chart-container h3 {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

#results-chart {
    width: 600px !important; /* Größeres Chart für bessere Webseiten-Darstellung */
    height: 600px !important;
    max-width: 600px;
    max-height: 600px;
    flex-shrink: 0;
}

.detailed-results {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-item {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
}

.result-item h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.result-percentage {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-light);
}

.result-description {
    color: var(--text-light);
    line-height: 1.6;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    color: white;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 2rem;
    }
/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .logo {
        height: 80px; /* Kleineres Logo auf Mobile */
    }
    
    .main-title {
        font-size: 2.5rem; /* Kleinere Schrift auf Mobile */
    }
    
    .subtitle {
        font-size: 1.2rem; /* Kleinere Schrift auf Mobile */
    }
    
    .welcome-content,
    .question-container,
    .email-content {
        padding: 2rem 1.5rem;
    }
    
    .question-title {
        font-size: 1.1rem;
    }
    
    .answer-option {
        font-size: 0.9rem;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .chart-container {
        padding: 1.5rem 1rem;
        height: 500px; /* Kleinere Höhe auf Mobile */
    }
    
    #results-chart {
        width: 400px !important; /* Kleineres Chart auf Mobile */
        height: 400px !important;
        max-width: 400px;
        max-height: 400px;
    }
    
    .detailed-results {
        gap: 1rem;
    }
    
    .result-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .welcome-content,
    .question-container,
    .email-content {
        padding: 1.5rem 1rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .welcome-content h2,
    .email-content h2,
    .results-content h2 {
        font-size: 1.8rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .info-box {
        padding: 1.5rem;
    }
    
    .progress-container {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .navigation,
    .results-actions,
    .footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .screen {
        display: block !important;
    }
    
    .results-content {
        max-width: none;
    }
}

