/* ============================================
   INHALTSVERZEICHNIS - rechnerseiten.css
   ============================================
   1. Basis-Styles (Reset, Body)
   2. Container & Layout
   3. Header Section
   4. Content & Form Section
   5. Form Elements (Input, Select, Labels)
   6. Buttons (Calculate, Add, Remove)
   7. Results Section (Tables, Summary)
   8. Download Section
   9. Error Handling & Validation
   10. Tooltips & Info Icons
   11. VLSM-Rechner Spezifisch (Subnetz-Anforderungen)
   12. Kontakt/Impressum/Datenschutz Seiten
   13. Top Header (aus test.html übernommen)
   14. Zusätzliche Utilities
   15. Dark Mode Overrides
   16. Responsive Design (Mobile)
   17. Animationen & Keyframes
============================================ */


/* ============================================
   1. BASIS-STYLES
   ============================================ */

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


/* ============================================
   2. CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 800px;
    margin: 60px auto 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}


/* ============================================
   3. HEADER SECTION
   ============================================ */

.header {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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


/* ============================================
   4. CONTENT & FORM SECTION
   ============================================ */

.content {
    padding: 40px 30px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}


/* ============================================
   5. FORM ELEMENTS
   ============================================ */

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    padding-right: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.form-group input::-webkit-outer-spin-button,
.form-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    transform: translateY(-2px);
}

.form-group input:invalid,
.form-group select:invalid {
    box-shadow: none;
}

/* Month Input Special Styling */
.form-group input[type="month"] {
    position: relative;
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.form-group input[type="month"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Select Dropdown Arrow */
.form-grid .form-group select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #888 50%), 
                      linear-gradient(135deg, #888 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), 
                         calc(100% - 13px) calc(1em + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* Unit Label (€, %, Jahre etc.) */
.unit {
    position: absolute;
    right: 20px;
    top: calc(50% + 10px);
    transform: translateY(-50%);
    color: #9ca3af;
    font-weight: 500;
    pointer-events: none;
    background: transparent;
    font-size: 0.9rem;
    z-index: 5;
}

.form-group .unit.select-unit {
    right: 30px;
    top: calc(50% + 10px);
}

/* Label Wrapper für Info-Icon */
.label-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* ============================================
   6. BUTTONS
   ============================================ */

.calculate-btn {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

/* Add Subnet Button */
.add-subnet-btn {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-subnet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

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

/* Remove Subnet Button */
.remove-subnet-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.remove-subnet-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.remove-subnet-btn:active {
    transform: scale(0.95);
}


/* ============================================
   7. RESULTS SECTION
   ============================================ */

.results-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 30px;
    display: none;
}

.results-section.show {
    display: block;
}

.results-header {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.results-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    max-height: 600px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 15px 12px;
    text-align: right;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

td:first-child, 
th:first-child {
    text-align: left;
    font-weight: 600;
}

tbody tr:hover {
    background: rgba(79, 172, 254, 0.05);
}

/* Summary Section */
.summary {
    background: #f8f9fa;
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.summary-item {
    flex: 1 1 220px;
    max-width: 260px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.summary-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}


/* ============================================
   8. DOWNLOAD SECTION
   ============================================ */

.download-section {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.download-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.download-btn.excel {
    background: linear-gradient(135deg, #217346 0%, #0f7b0f 100%);
}

.download-btn.pdf {
    background: linear-gradient(135deg, #d73527 0%, #b91c1c 100%);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.download-icon {
    width: 20px;
    height: 20px;
}

.download-btn svg.download-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* ============================================
   9. ERROR HANDLING & VALIDATION
   ============================================ */

.error {
    border-color: #e74c3c !important;
    background: #fdf2f2 !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}


/* ============================================
   10. TOOLTIPS & INFO ICONS
   ============================================ */

.info-icon {
    background: #6b6b6ba2;
    color: white;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    line-height: normal;
}

.tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 220px;
    z-index: 10;
    top: 25px;
    left: 0;
    display: none;
}

.tooltip.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.label-wrapper .info-icon:hover + .tooltip,
.label-wrapper .info-icon:focus + .tooltip {
    display: block;
}


/* ============================================
   11. VLSM-RECHNER SPEZIFISCH
   ============================================ */

/* Subnetz-Anforderungen Sektion */
.subnet-requirements {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px solid #e2e8f0;
}

.subnet-requirements h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 600;
}

.subnet-requirements p {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Subnetz-Eingabe Container */
#subnetInputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Einzelne Subnetz-Eingabezeile */
.subnet-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.subnet-input-row:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.subnet-input-row .subnet-name,
.subnet-input-row .subnet-hosts {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.subnet-input-row .subnet-name:focus,
.subnet-input-row .subnet-hosts:focus {
    outline: none;
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.subnet-input-row .subnet-name:hover,
.subnet-input-row .subnet-hosts:hover {
    border-color: #cbd5e0;
}

.subnet-input-row .subnet-name::placeholder,
.subnet-input-row .subnet-hosts::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Subnetz-Ergebnisse */
#subnetErgebnisse {
    padding: 0 30px 30px 30px;
}

#subnetErgebnisse h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e2e8f0;
}

.subnet-result-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.subnet-result-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.subnet-result-card h4 {
    font-size: 1.3rem;
    color: #1a202c;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subnet-result-card h4::before {
    content: "🌐";
    font-size: 1.2rem;
}

.subnet-result-card .table-container {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.subnet-result-card table {
    background: white;
}

.subnet-result-card td {
    padding: 12px 15px;
}

.subnet-result-card td:first-child {
    font-weight: 600;
    color: #4a5568;
    width: 40%;
}

.subnet-result-card td:last-child {
    color: #2d3748;
    font-family: 'Courier New', monospace;
}

.subnet-result-card .summary {
    background: white;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.subnet-result-card .summary .summary-item {
    flex: 1 1 180px;
    max-width: 250px;
    padding: 15px;
    min-width: 180px;
}

.subnet-result-card .summary .summary-item .summary-value {
    font-size: 1.5rem;
    word-break: break-all;
    line-height: 1.3;
}


/* ============================================
   12. KONTAKT/IMPRESSUM/DATENSCHUTZ SEITEN
   ============================================ */

.contact-info,
.privacy-info,
.impressum-info {
    padding: 40px;
    margin: 80px auto;
}

.contact-info .content,
.privacy-info .content,
.impressum-info .content {
    padding: 0 20px;
}

.contact-info .form-section,
.privacy-info .form-section,
.impressum-info .form-section {
    padding: 40px;
    margin-bottom: 50px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-info h2,
.privacy-info h2,
.impressum-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e2e8f0;
}

.privacy-info h3,
.impressum-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

.contact-info p,
.privacy-info p,
.impressum-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 30px;
    max-width: 900px;
}

.contact-info .contact-email,
.privacy-info .contact-email,
.impressum-info .contact-email {
    font-size: 1.2rem;
    margin: 40px 0;
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.contact-info .contact-email:hover,
.privacy-info .contact-email:hover,
.impressum-info .contact-email:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-info .contact-email strong,
.privacy-info .contact-email strong,
.impressum-info .contact-email strong {
    font-weight: 600;
    color: #2d3748;
}

.contact-info .contact-email a,
.privacy-info .contact-email a,
.impressum-info .contact-email a {
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
}

.contact-info .contact-email a:hover,
.privacy-info .contact-email a:hover,
.impressum-info .contact-email a:hover {
    text-decoration: underline;
}


/* ============================================
   13. TOP HEADER (aus test.html übernommen)
   ============================================ */

.top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
}

.top-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(to right, #d84462, #764ba2);
}

.top-header .home-icon {
    color: #666;
    font-size: 18px;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.top-header .home-icon:hover {
    background: #f0f0f0;
}

.home-logo {
    width: 32px;
    height: auto;
    vertical-align: middle;
}

.top-header .logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.top-header .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-header .language-selector {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.top-header .language-selector:hover {
    background: #eaeaea;
    border-color: #ccc;
}

.top-header .theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-header .toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.top-header .toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.top-header .toggle-switch.dark {
    background: #4a5568;
}

.top-header .toggle-switch.dark::before {
    transform: translateX(26px);
}

.top-header .toggle-icon {
    color: #666;
    font-size: 16px;
}


/* ============================================
   14. ZUSÄTZLICHE UTILITIES
   ============================================ */

.site-footer a:focus {
    outline: 3px solid rgba(214, 68, 98, 0.15);
    outline-offset: 2px;
}


/* ============================================
   15. DARK MODE OVERRIDES
   ============================================ */

/* Container & Sections */
[data-theme="dark"] .container {
    background: var(--card-bg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

[data-theme="dark"] .header {
    background: var(--bg-primary);
    color: var(--text-header);
}

[data-theme="dark"] .form-section,
[data-theme="dark"] .results-section,
[data-theme="dark"] .summary,
[data-theme="dark"] .subnet-result-card,
[data-theme="dark"] .download-section {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    color: var(--text-primary);
}

/* Results Header */
[data-theme="dark"] .results-header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: var(--text-header);
}

/* Labels & Form Elements */
[data-theme="dark"] .form-group label,
[data-theme="dark"] .label-wrapper label,
[data-theme="dark"] label {
    color: var(--text-header) !important;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: #1f2937;
    border-color: #4b5563;
    color: #fff;
}

[data-theme="dark"] .form-group input[type="month"] {
    color: #fff !important;
}

[data-theme="dark"] .info-icon,
[data-theme="dark"] .unit,
[data-theme="dark"] .error-message {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] form#budgetForm .form-group label,
[data-theme="dark"] form#finanzierungsForm .form-group label {
    color: var(--text-header) !important;
}

/* Tables */
[data-theme="dark"] th,
[data-theme="dark"] td {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] th {
    background: #2d3748;
    color: var(--text-header);
}

/* Summary Items */
[data-theme="dark"] .summary {
    background: #1a202c;
}

[data-theme="dark"] .summary .summary-item {
    background: #2d3748;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .summary .summary-value,
[data-theme="dark"] .subnet-result-card .summary .summary-value {
    color: #667eea;
}

[data-theme="dark"] .summary .summary-label,
[data-theme="dark"] .subnet-result-card .summary .summary-label {
    color: #a0aec0;
}

/* VLSM Subnetz Dark Mode */
[data-theme="dark"] .subnet-requirements {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .subnet-requirements h3 {
    color: #f7fafc;
}

[data-theme="dark"] .subnet-requirements p {
    color: #a0aec0;
}

[data-theme="dark"] .subnet-input-row {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .subnet-input-row:hover {
    border-color: #718096;
}

[data-theme="dark"] .subnet-input-row .subnet-name,
[data-theme="dark"] .subnet-input-row .subnet-hosts {
    background: #1a202c;
    border-color: #4a5568;
    color: #f7fafc;
}

[data-theme="dark"] .subnet-input-row .subnet-name:focus,
[data-theme="dark"] .subnet-input-row .subnet-hosts:focus {
    background: #0f1419;
    border-color: #667eea;
}

[data-theme="dark"] .subnet-input-row .subnet-name::placeholder,
[data-theme="dark"] .subnet-input-row .subnet-hosts::placeholder {
    color: #718096;
}

[data-theme="dark"] .subnet-result-card {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .subnet-result-card:hover {
    border-color: #718096;
}

[data-theme="dark"] .subnet-result-card h4 {
    color: #f7fafc;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .subnet-result-card table {
    background: #2d3748;
}

[data-theme="dark"] .subnet-result-card td:first-child {
    color: #a0aec0;
}

[data-theme="dark"] .subnet-result-card td:last-child {
    color: #f7fafc;
}

[data-theme="dark"] .subnet-result-card .summary {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .subnet-result-card .summary .summary-item {
    background: #1a202c;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] #subnetErgebnisse h3 {
    color: #f7fafc;
    border-bottom-color: #4a5568;
}

/* Kontakt/Impressum/Datenschutz Dark Mode */
[data-theme="dark"] .contact-info h2,
[data-theme="dark"] .contact-info p,
[data-theme="dark"] .contact-info .contact-email strong,
[data-theme="dark"] .contact-info .contact-email a,
[data-theme="dark"] .privacy-info h2,
[data-theme="dark"] .privacy-info h3,
[data-theme="dark"] .privacy-info p,
[data-theme="dark"] .privacy-info .contact-email strong,
[data-theme="dark"] .privacy-info .contact-email a,
[data-theme="dark"] .impressum-info h2,
[data-theme="dark"] .impressum-info h3,
[data-theme="dark"] .impressum-info p,
[data-theme="dark"] .impressum-info .contact-email strong,
[data-theme="dark"] .impressum-info .contact-email a {
    color: #ffffff;
}

[data-theme="dark"] .contact-info .header p[data-lang="contact_subtitle"],
[data-theme="dark"] .privacy-info .header p[data-lang="privacy_intro"],
[data-theme="dark"] .impressum-info .header p[data-lang="impressum_title"] {
    color: #ffffff;
    opacity: 0.9;
}

[data-theme="dark"] .contact-info .form-section,
[data-theme="dark"] .privacy-info .form-section,
[data-theme="dark"] .impressum-info .form-section {
    background: #1f2937;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .contact-info h2,
[data-theme="dark"] .privacy-info h2,
[data-theme="dark"] .impressum-info h2 {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .contact-info .contact-email,
[data-theme="dark"] .privacy-info .contact-email,
[data-theme="dark"] .impressum-info .contact-email {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .contact-info .contact-email:hover,
[data-theme="dark"] .privacy-info .contact-email:hover,
[data-theme="dark"] .impressum-info .contact-email:hover {
    border-color: #718096;
}

[data-theme="dark"] .contact-info .contact-email a,
[data-theme="dark"] .privacy-info .contact-email a,
[data-theme="dark"] .impressum-info .contact-email a {
    color: #667eea;
}


/* ============================================
   16. RESPONSIVE DESIGN (MOBILE)
   ============================================ */

/* Tablet & Mittelgroße Screens */
@media (max-width: 768px) {
    /* Header */
    .header h1 {
        font-size: 2rem;
    }
    
    /* Form */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Summary */
    .summary-item {
        display: block;
        margin: 10px 0;
    }
    
    /* Tables */
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    /* VLSM Subnetz */
    .subnet-input-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .remove-subnet-btn {
        width: 100%;
        height: 40px;
    }
    
    .subnet-requirements {
        padding: 20px 15px;
    }
    
    .subnet-requirements h3 {
        font-size: 1.1rem;
    }
    
    #subnetErgebnisse {
        padding: 0 15px 20px 15px;
    }
    
    .subnet-result-card {
        padding: 15px;
    }
    
    .subnet-result-card h4 {
        font-size: 1.1rem;
    }
    
    .subnet-result-card .summary {
        padding: 10px;
    }
    
    .subnet-result-card .summary .summary-item {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    /* Kontakt/Impressum/Datenschutz */
    .contact-info,
    .privacy-info,
    .impressum-info {
        padding: 40px 20px;
        margin: 60px auto;
    }

    .contact-info h2,
    .privacy-info h2,
    .impressum-info h2 {
        font-size: 1.5rem;
    }

    .privacy-info h3,
    .impressum-info h3 {
        font-size: 1.3rem;
    }

    .contact-info p,
    .privacy-info p,
    .impressum-info p {
        font-size: 1rem;
    }

    .contact-info .contact-email,
    .privacy-info .contact-email,
    .impressum-info .contact-email {
        font-size: 1.1rem;
        margin: 30px 0;
        padding: 15px;
    }
    
    /* Top Header auf Mobile - Theme Toggle ausblenden */
    .top-header .theme-toggle {
        display: none !important;
    }
    
    .top-header .language-selector {
        display: block !important;
    }
}

/* Top Header Responsive */
@media (max-width: 600px) {
    .top-header {
        padding: 8px 12px;
    }
    
    .top-header .logo { 
        font-size: 18px; 
    }
    
    .top-header .header-controls { 
        gap: 8px; 
    }
    
    .top-header .language-selector { 
        display: none; 
    }
}

/* Kleine Mobile Geräte */
@media (max-width: 480px) {
    .add-subnet-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .subnet-input-row .subnet-name,
    .subnet-input-row .subnet-hosts {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .contact-info h2,
    .privacy-info h2,
    .impressum-info h2 {
        font-size: 1.3rem;
    }

    .privacy-info h3,
    .impressum-info h3 {
        font-size: 1.2rem;
    }

    .contact-info .form-section,
    .privacy-info .form-section,
    .impressum-info .form-section {
        padding: 20px;
    }
}


/* ============================================
   17. ANIMATIONEN & KEYFRAMES
   ============================================ */

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================
   ETF SPARPLAN RECHNER SPEZIFISCH
   ============================================ */

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.tab-button.active {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(216, 68, 98, 0.3);
}

/* Calculator Content Areas */
.calculator-content {
    display: none;
}

.calculator-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Advanced Options Toggle */
.advanced-options {
    margin-top: 20px;
    border-top: 2px solid #e1e5e9;
    padding-top: 20px;
}

.toggle-advanced {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 12px 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.toggle-advanced:hover {
    background: #e9ecef;
    border-color: #cbd5e0;
}

.toggle-advanced .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.toggle-advanced.open .arrow {
    transform: rotate(180deg);
}

.advanced-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* ETF Comparison Box */
.etf-comparison-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.etf-comparison-box:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.etf-comparison-box h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Comparison Results */
.comparison-results {
    margin-top: 30px;
}

.comparison-results h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.comparison-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.comparison-card.best {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.02) 100%);
}

.best-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.comparison-card h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #2d3748;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.comparison-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
}

/* Cost Breakdown */
.cost-breakdown {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.cost-breakdown h3 {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.cost-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cost-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cost-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #4a5568;
    font-weight: 600;
}

.cost-bar-bg {
    width: 100%;
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.cost-bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 1.5s ease;
    position: relative;
    overflow: hidden;
}

.cost-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Dark Mode für ETF Rechner */
[data-theme="dark"] .calculator-tabs {
    background: #1a202c;
}

[data-theme="dark"] .tab-button {
    color: #a0aec0;
}

[data-theme="dark"] .tab-button:hover {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

[data-theme="dark"] .tab-button.active {
    background: linear-gradient(135deg, #d84462 0%, #764ba2 100%);
    color: white;
}

[data-theme="dark"] .advanced-options {
    border-top-color: #4a5568;
}

[data-theme="dark"] .toggle-advanced {
    background: #1a202c;
    border-color: #4a5568;
    color: #f7fafc;
}

[data-theme="dark"] .toggle-advanced:hover {
    background: #2d3748;
    border-color: #718096;
}

[data-theme="dark"] .advanced-content {
    border-top-color: #4a5568;
}

[data-theme="dark"] .etf-comparison-box {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .etf-comparison-box:hover {
    border-color: #718096;
}

[data-theme="dark"] .etf-comparison-box h3 {
    color: #f7fafc;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .comparison-results h3 {
    color: #f7fafc;
}

[data-theme="dark"] .comparison-card {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .comparison-card.best {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
}

[data-theme="dark"] .comparison-card h4 {
    color: #f7fafc;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .stat-item {
    border-bottom-color: #2d3748;
}

[data-theme="dark"] .stat-label {
    color: #a0aec0;
}

[data-theme="dark"] .stat-value {
    color: #f7fafc;
}

[data-theme="dark"] .cost-breakdown {
    background: #1a202c;
}

[data-theme="dark"] .cost-breakdown h3 {
    color: #f7fafc;
}

[data-theme="dark"] .cost-bar-label {
    color: #a0aec0;
}

[data-theme="dark"] .cost-bar-bg {
    background: #2d3748;
}

[data-theme="dark"] .chart-container {
    background: #1a202c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive für ETF Rechner */
@media (max-width: 768px) {
    .calculator-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-button {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .comparison-cards {
        grid-template-columns: 1fr;
    }
    
    .comparison-card {
        padding: 20px;
    }
    
    .best-badge {
        font-size: 10px;
        padding: 4px 12px;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .cost-breakdown {
        padding: 20px 15px;
    }
    
    .cost-breakdown h3 {
        font-size: 1.2rem;
    }
    
    .cost-bar-label {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .chart-container {
        padding: 15px;
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .tab-button {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .etf-comparison-box {
        padding: 15px;
    }
    
    .etf-comparison-box h3 {
        font-size: 1.1rem;
    }
    
    .comparison-card h4 {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
}

/* Animation für Tab-Wechsel */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ENDE ETF SPARPLAN RECHNER SPEZIFISCH
   ============================================ */

/* ============================================
   ENDE rechnerseiten.css
   ============================================ */