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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: #4caf50;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 0 1rem 3rem 1rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hauptinhalt */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

/* Formular */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #999;
}

/* Button */
.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

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

/* Ergebnisse */
.result-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.result-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.result-grid {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #4caf50;
    min-height: 60px;
    line-height: 1.5;
}

.result-item.highlight {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border-left-color: #fff;
    min-height: 60px;
}

.result-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.result-value {
    font-weight: 600;
    font-size: 1.0rem;
    margin: 0 0.5rem;
    line-height: 1.6;
}

.result-unit {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
    line-height: 1.4;
}

/* Fehlermeldungen */
.error-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 12px;
    color: #c33;
}

.error-message p {
    margin: 0;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    color: #4caf50;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-link {
    color: #4caf50;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

/* Impressum Styles */
.impressum-content {
    text-align: left;
}

.impressum-content section {
    margin-bottom: 2rem;
}

.impressum-content h2 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.impressum-content h3 {
    color: #555;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1.5rem 0 0.5rem 0;
}

.impressum-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #666;
}

.impressum-content strong {
    color: #333;
    font-weight: 600;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.back-link .calculate-btn {
    display: inline-block;
    width: auto;
    padding: 0.75rem 2rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .result-value {
        margin: 0;
    }
}

/* Hintergrundbild und Overlay */
.background-image {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: url('../images/img.png') center center/cover no-repeat;
    z-index: 0;
    filter: brightness(0.85) blur(1px);
}
.overlay {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.result-section {
    animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.btn-loading {
    display: none;
}

.calculate-btn.loading .btn-text {
    display: none;
}

.calculate-btn.loading .btn-loading {
    display: inline;
}

/* Tab-Navigation */
.tab-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
    max-width: 600px;
    width: 100%;
    justify-content: center;
}

.tab-btn {
    width: 100%;
    height: 80px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.tab-btn:hover {
    background: #e9ecef;
    border-color: #4caf50;
    color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #4caf50;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    z-index: 2;
}

/* Tab-Inhalte */
.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

/* Responsive Tabs */
@media (max-width: 1000px) {
    .tab-navigation {
        max-width: 400px;
        gap: 0.8rem;
    }
    .tab-btn {
        height: 60px;
        font-size: 1rem;
    }
}

@media (max-width: 769px) {
    .tab-navigation {
        display: none; /* Wird durch mobile accordion ersetzt */
    }
}

/* Responsive Anzeige-Steuerung */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* Mobile Accordion Styles */
.mobile-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-card.active {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.accordion-header {
    padding: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-card.active .accordion-header {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.accordion-card.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-card.active .accordion-content {
    max-height: 1000px;
    padding: 1.5rem;
}

/* Zusätzliche mobile Styles */
@media (max-width: 768px) {
    .calculator-card {
        padding: 1.5rem;
    }
}