:root {
    --primary-color: #7c3aed; /* Rich purple */
    --primary-light: #a78bfa; /* Light purple */
    --secondary-color: #f59e0b; /* Deep amber */
    --danger-color: #ef4444; /* Bright red */
    --success-color: #10b981; /* Emerald green */
    --light-color: #f9fafb; /* Off-white */
    --dark-color: #1f2937; /* Dark slate */
    --border-color: #e5e7eb; /* Light gray */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-hover: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

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

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-light);
    color: var(--dark-color);
    line-height: 1.6;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    text-size-adjust: 100%;
}

header {
    background: var(--gradient);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent 70%);
}

header h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    font-size: 2.5rem;
    position: relative;
}

header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.tool-hinweis {
    background: rgba(255, 243, 205, 0.9);
    border: 2px solid #e67e22;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem auto 0;
    color: #8b4513;
    font-size: 0.95rem;
    text-align: center;
    backdrop-filter: blur(5px);
    max-width: 700px;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section {
    background-color: white;
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

section:hover {
    box-shadow: var(--shadow-hover);
}

section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.03), transparent 70%);
    border-radius: 0 0 24px 0;
    pointer-events: none;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    letter-spacing: -0.025em;
    font-size: 1.875rem;
}

h3 {
    margin: 1.5rem 0 1rem;
    color: var(--dark-color);
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: 1.5rem;
}

h4 {
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.975rem;
}

input[type="number"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--light-color);
    /* Remove Spin Buttons */
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Remove Spin Buttons for Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"]:hover {
    border-color: var(--primary-light);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    background-color: white;
}

button {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

button:hover {
    box-shadow: var(--shadow-hover);
    background: var(--gradient-hover);
}

button:active {
    transform: translateY(0);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover::before {
    opacity: 1;
}

.toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.toggle-container label:first-child {
    margin-right: 1rem;
    margin-bottom: 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Gemeinsame Styles für Formular-Container */
.persoenliche-daten,
.zusatzversicherungen {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: var(--light-color);
    transition: all 0.3s ease;
}

.persoenliche-daten:hover,
.zusatzversicherungen:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.persoenliche-daten h3,
.zusatzversicherungen h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: 1.5rem;
}

/* Spezifische Styles für Zusatzversicherungen */
.zusatzversicherungen {
    margin-bottom: 2rem;
}

.versicherung-container {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s;
    border-radius: 12px;
}

.versicherung-container:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.versicherung-input {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-placeholder, .custom-logo {
    width: 200px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 1px solid var(--primary-light);
    color: var(--dark-color);
    border-radius: 12px;
    margin-right: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.875rem 1.5rem;
    box-shadow: var(--shadow);
}

.logo-placeholder span, .custom-logo span {
    color: var(--dark-color);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.logo-placeholder:hover, .custom-logo:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--dark-color);
    box-shadow: var(--shadow-hover);
}

.logo-placeholder img, .custom-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    margin: 0 auto;
}

/* Ergebnis Bereich */
.hidden {
    display: none;
}

.ergebnis-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.chart-container {
    height: auto;
    min-height: 700px;
    max-height: 1000px;
    margin-bottom: 2rem;
    overflow-y: auto;
    aspect-ratio: 16/9;
}

.ergebnis-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.ergebnis-box {
    background-color: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.ergebnis-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ergebnis-box:hover::before {
    transform: scaleX(1);
}

.ergebnis-box:hover {
    box-shadow: var(--shadow-hover);
}

#aktuellesGehaltBox {
    border-top: 4px solid var(--primary-color);
}

#rentenBox {
    border-top: 4px solid var(--secondary-color);
}

#lueckeBox {
    border-top: 4px solid var(--danger-color);
}

#zusatzBox {
    border-top: 4px solid var(--success-color);
}

.ergebnis-wert {
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

#aktuellesGehaltWert {
    color: var(--primary-color);
}

#renteWert {
    color: var(--secondary-color);
}

#lueckeWert {
    color: var(--danger-color);
}

#zusatzWert {
    color: var(--success-color);
}

.aktionen {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

#neuBerechnenButton {
    background-color: var(--light-color);
    color: var(--dark-color);
}

#neuBerechnenButton:hover {
    background-color: #e9ecef;
}

#pdfExportButton {
    background-color: var(--success-color);
}

#pdfExportButton:hover {
    background-color: #27ae60;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #374151 100%);
    color: white;
    margin-top: 4rem;
    padding: 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.1), transparent 50%);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
    position: relative;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-brand h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

.footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    padding: 0.375rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.25rem;
}

.footer-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 50px; /* Konsistente Mindesthöhe */
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1.5;
    vertical-align: middle;
}

.footer-links a:hover {
    color: var(--primary-light);
    transform: translateY(-1px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    vertical-align: middle;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-brand h3 {
        font-size: 1.5rem;
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-content {
        padding: 2rem 1rem 1rem;
    }
}

/* Responsive Anpassungen */
@media (min-width: 768px) {
    .ergebnis-container {
        flex-direction: row;
    }
    
    .chart-container {
        flex: 1;
        margin-bottom: 0;
    }
    
    .ergebnis-details {
        flex: 1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .versicherung-input {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo-placeholder {
        margin-bottom: 1rem;
    }
    
    .aktionen {
        flex-direction: column;
        gap: 1rem;
    }
    
    button {
        width: 100%;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: backdrop-filter 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 4rem;
    border-radius: 24px;
    position: relative;
    max-width: 98vw;
    max-height: 98vh;
    width: 1800px; /* 100% größer: von 1200px auf 1800px */
    min-height: 800px; /* Mindesthöhe für mehr Platz */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(124, 58, 237, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 1% auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    text-size-adjust: 100%;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: -0.025em;
}

.modal-content h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.close-button {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--light-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.close-button:hover {
    background-color: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.modal-chart-container {
    width: 100%;
    height: auto;
    min-height: 800px; /* Increased minimum height to ensure euro values are always visible */
    max-height: 1000px; /* Increased for larger modal */
    margin: 2rem 0;
    overflow-y: auto;
    aspect-ratio: 16/9; /* Wide landscape format */
}

#modalChart {
    width: 100% !important;
    height: 100% !important;
    display: block;
    /* Enhanced canvas text rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: crisp-edges;
    text-rendering: optimizeLegibility;
}

.modal-ergebnis-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Modal-Aktionen CSS entfernt - keine Buttons mehr im Modal */

@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .form-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .versicherung-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logo-placeholder {
        margin-bottom: 0.5rem;
    }

    button {
        padding: 0.875rem 1.5rem;
    }

    .modal-content {
        padding: 2rem;
        border-radius: 20px;
        width: 95vw;
        min-height: 700px; /* Increased minimum height for mobile to ensure euro values are visible */
    }
}

/* Formular-Spalten */
.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.form-column {
    min-width: 0;
}

#berechnenButton {
    background: var(--gradient);
    width: 100%;
    padding: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2rem;
    font-size: 1.125rem;
}

#zusatzversicherungHinzufuegen {
    background: #f3f4f6;
    border: 1px solid var(--primary-light);
    color: var(--dark-color);
    padding: 0.875rem 1.5rem;
    box-shadow: var(--shadow);
}

#zusatzversicherungHinzufuegen:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.modal-aktionen button {
    min-width: 200px;
}

.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.insurance-card {
    position: relative;
    background-color: #f9fafb;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.insurance-logo-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.insurance-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    width: auto;
    display: block;
}

.insurance-card > * {
    margin-bottom: 10px;
}

.insurance-card p {
    color: var(--dark-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Neue Styles für ausklappbare Beschreibungen */
.description-toggle {
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    -webkit-user-select: none;
    user-select: none;
}

.description-toggle:hover span {
    text-decoration: underline;
}

.description-toggle::after {
    content: '▼';
    margin-left: 5px;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.description-toggle.expanded::after {
    transform: rotate(180deg);
}

.description-content {
    display: none;
    margin-top: 5px;
    margin-bottom: 10px;
    background-color: #f9fafb;
    padding: 10px;
    border-radius: 8px;
}

.description-content.expanded {
    display: block;
    animation: fadeIn 0.3s ease;
}

.description-list {
    margin: 0;
    padding-left: 20px;
}

.description-list li {
    margin-bottom: 5px;
}

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

.insurance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.insurance-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.insurance-card:hover::before {
    opacity: 1;
}

.insurance-card h3 {
    color: var(--dark-color);
    margin: 0;
    font-size: 1.2rem;
}

.insurance-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.price-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 0;
    font-weight: bold;
}

.select-insurance {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.select-insurance:hover {
    background: var(--gradient-hover);
    box-shadow: var(--shadow-hover);
}

/* Insurance Modal Styles */
.insurance-type-title {
    margin-bottom: 20px;
    text-align: center;
}

.bu-option, .phv-option {
    display: none; /* Will be shown/hidden via JavaScript */
}

/* Styles for add insurance dropdown and suggestions */
.versicherung-typ-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--light-color);
    appearance: none; /* Remove default appearance */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    margin-bottom: 1rem;
    cursor: pointer;
}

.versicherung-typ-select:hover {
    border-color: #c0c0c0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.versicherung-typ-select:focus {
    outline: none;
    border-color: #666666;
    box-shadow: 0 0 0 4px rgba(200, 200, 200, 0.2);
    background-color: white;
}

/* Styling for the dropdown options */
.versicherung-typ-select option {
    padding: 12px;
    background-color: white;
    color: var(--dark-color);
}

.versicherung-typ-select option:first-child {
    font-style: italic;
    color: #6b7280;
}

.versicherung-typ-select option:hover,
.versicherung-typ-select option:focus,
.versicherung-typ-select option:checked {
    background-color: var(--primary-light);
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Custom dropdown menu styling (for browsers that support it) */
.versicherung-typ-select::-ms-expand {
    display: none;
}

/* Custom dropdown styling */
.custom-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.custom-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background-color: var(--light-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-dropdown-selected:hover {
    border-color: #c0c0c0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.custom-dropdown-selected:after {
    content: '';
    width: 0.8em;
    height: 0.5em;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
}

.custom-dropdown-selected.open:after {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid var(--border-color);
}

.custom-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.custom-dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.custom-dropdown-item:hover {
    background-color: var(--light-color);
}

.custom-dropdown-item.selected {
    background-color: #f0f0f0;
    color: #333333;
    font-weight: 500;
}

.custom-dropdown-item.selected .dropdown-item-icon {
    background-color: #f5f5f5;
    color: #4b5563;
}

.custom-dropdown-placeholder {
    color: #6b7280;
    font-style: italic;
}

/* Add smooth scrollbar for the dropdown menu */
.custom-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 var(--light-color);
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 12px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-radius: 12px;
}

/* Dropdown item icons */
.dropdown-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 12px;
    border-radius: 6px;
    background-color: #f5f5f5;
    color: #4b5563;
    padding: 5px;
    flex-shrink: 0;
}

.dropdown-item-icon svg {
    width: 100%;
    height: 100%;
}

.vorschlaege-container {
    margin-top: 1rem;
    background-color: var(--light-color);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.vorschlaege-container h5 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    font-weight: 600;
}

.vorschlag {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vorschlag:last-child {
    margin-bottom: 0;
}

.vorschlag:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.vorschlag strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.vorschlag p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.zusatz-versicherung {
    position: relative;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background-color: white;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.zusatz-versicherung .logo-placeholder {
    height: 120px;
    width: 200px;
}

.remove-versicherung {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-versicherung:hover {
    background-color: #e74c3c;
}

/* Styles for suggestion cards with logos */
.vorschlag-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.vorschlag-logo {
    width: 50px;
    height: 30px;
    object-fit: contain;
    margin-right: 0.75rem;
}

.vorschlag strong {
    display: block;
    color: var(--primary-color);
    flex: 1;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}
.toast {
    min-width: 250px;
    padding: 15px 25px 15px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s;
    position: relative;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-success {
    background-color: var(--success-color);
}
.toast-error {
    background-color: var(--danger-color);
}
.toast-info {
    background-color: var(--primary-color);
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
}

.toast-close:hover {
    opacity: 1;
}

/* Chart.js tooltip z-index fix */
.chart-container canvas {
    position: relative;
    z-index: 1;
}

/* Ensure Chart.js tooltips appear above custom elements */
.chartjs-tooltip {
    position: absolute !important;
    z-index: 10000 !important;
    pointer-events: none !important;
}

/* Modal chart container adjustments */
.modal-chart-container {
    position: relative;
    z-index: 1;
}

.modal-chart-container canvas {
    position: relative;
    z-index: 1;
}

/* Styles for all insurance containers, both fixed and additional */
.versicherung-container, .zusatz-versicherung {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s;
    border-radius: 12px;
}

.versicherung-container:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.versicherung-input, .zusatz-versicherung .versicherung-input {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Enhanced text rendering for modal elements */
.modal-content,
.modal-content *,
.modal h2,
.modal h3,
.modal p,
.modal span,
.modal button {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    backface-visibility: hidden;
    transform: translateZ(0);
    font-display: swap;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Additional modal text optimizations */
.modal-content h2 {
    font-weight: 700 !important;
    font-synthesis: none;
    -webkit-text-stroke: 0.01em transparent;
}

.modal-content h3 {
    font-weight: 600 !important;
    font-synthesis: none;
}

/* Canvas specific optimizations */
#modalChart {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: crisp-edges;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure Poppins font is properly loaded */
@font-face {
    font-family: 'Poppins';
    font-display: swap;
    src: local('Poppins');
}

/* Additional font loading optimization */
body, 
.modal-content,
canvas {
    font-optical-sizing: auto;
    font-variation-settings: normal;
    font-synthesis: weight style;
}

/* Impressum Styles */
.impressum-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.impressum-section {
    margin-bottom: 3rem;
}

.wichtiger-hinweis {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #e67e22;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.15);
}

.wichtiger-hinweis h2 {
    color: #d35400 !important;
    border-bottom: 2px solid #e67e22 !important;
    font-weight: 700;
}

.wichtiger-hinweis p {
    font-size: 1.1rem;
    color: #8b4513;
    font-weight: 600;
}

.impressum-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.impressum-section h3 {
    color: var(--dark-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.25rem;
}

.impressum-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--dark-color);
}

.impressum-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.impressum-section a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.back-link {
    margin-top: 3rem;
    text-align: center;
}

.btn-back {
    background: var(--gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-back:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Footer Links */
.footer-links {
    text-align: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    border-top: 3px solid var(--primary-color);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent:not(.hidden) {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-light);
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

.cookie-buttons {
    flex-shrink: 0;
}

.btn-accept {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-accept:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-text {
        order: 1;
    }
    
    .cookie-buttons {
        order: 2;
    }
    
    .impressum-container {
        padding: 1.5rem;
    }
    
    .impressum-section {
        margin-bottom: 2rem;
    }
} 