/* Questrial Font Face */
@font-face {
    font-family: 'Questrial';
    src: url('../includes/fonts/Questrial-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --accent-color: #f56565;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Button-Basis-Variablen für einheitliches Design */
    --button-height: 40px; /* Einheitliche Höhe für alle Buttons */
    --button-padding-y: 0.625rem; /* Vertikales Padding */
    --button-padding-x: 1rem; /* Horizontales Padding */
    --button-font-size: 0.9rem; /* Einheitliche Schriftgröße */
    --button-font-weight: 500; /* Einheitliche Schriftstärke */
    --button-border-radius: 6px; /* Einheitlicher Border-Radius */
    --button-gap: 0.5rem; /* Gap zwischen Icon und Text */
}

body {
    font-family: 'Questrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: 
        linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
        url('images/hero-bg.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
}

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

/* Header Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Header Actions (Counter + Language Toggle) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0; /* Verhindert Schrumpfen */
    flex-wrap: nowrap !important; /* Verhindert Umbrechen - wichtig! */
    flex-direction: row; /* Explizit horizontal */
}

/* Visit Counter - verwendet Button-Basis */
.visit-counter {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    min-height: var(--button-height);
    padding: var(--button-padding-y) var(--button-padding-x);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 25px; /* Abgerundeter für Counter */
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    flex-basis: auto;
}

.visit-counter:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.visit-counter svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.visit-counter #visit-count {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Language Toggle */
.language-toggle {
    display: inline-flex !important; /* Inline-flex für bessere Ausrichtung */
    flex-shrink: 0 !important; /* Verhindert Schrumpfen */
    flex-basis: auto; /* Automatische Breite */
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    min-height: var(--button-height);
    padding: var(--button-padding-y) var(--button-padding-x);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 25px; /* Abgerundeter für Language Button */
    cursor: pointer;
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.lang-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

#current-lang {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1); /* Logo weiß machen für dunklen Header */
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: white;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.admin-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== EINHEITLICHE BUTTON-BASIS ===== */
/* Alle Buttons verwenden die CSS-Variablen aus :root für konsistentes Design */

/* Einheitliche Header-Buttons */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    padding: var(--button-padding-y) var(--button-padding-x);
    min-height: var(--button-height);
    border: none;
    border-radius: var(--button-border-radius);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

.header-btn span {
    white-space: nowrap;
}

/* Button-Varianten */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

.btn-info:hover {
    background: linear-gradient(135deg, #117a8b, #0c5460);
}

.btn-translate {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    border-color: #6f42c1;
    color: white;
}

.btn-translate:hover {
    background: linear-gradient(135deg, #5a32a3, #4c2a91);
    border-color: #5a32a3;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #bd2130, #a71e2a);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    color: #212529;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-brand {
        gap: 0.5rem;
    }
    
    .header-logo {
        height: 40px;
    }
    
    .brand-title {
        font-size: 1.2rem;
    }
    
    /* Stelle sicher, dass header-actions auch auf mobilen Geräten horizontal bleibt */
    .header-actions {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .visit-counter,
    .language-toggle {
        flex-shrink: 0 !important;
        display: inline-flex !important;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-btn span {
        display: none;
    }
    
    .header-btn {
        padding: var(--button-padding-y);
        min-width: var(--button-height);
        min-height: var(--button-height);
        justify-content: center;
    }
    
    /* Auf mobilen Geräten: Buttons sollten konsistente Höhe behalten */
    .visit-counter,
    .lang-btn {
        min-height: var(--button-height);
    }
}

/* AI Toggle Schalter */
.ai-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.ai-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.ai-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

.ai-toggle input:checked + .ai-slider {
    background-color: #007bff;
}

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

.ai-toggle-label {
    font-weight: bold;
    color: #495057;
    font-size: 1.1rem;
}

.ai-toggle input:checked ~ .ai-toggle-label {
    color: #007bff;
}

/* Form Transitions */
#standard-form, #ai-form {
    transition: opacity 0.3s ease-in-out;
}

/* Entry Actions */
.entry-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

/* Edit/Delete Buttons - etwas kleiner für Entry-Cards */
.btn-edit, .btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    min-height: 32px; /* Etwas kleiner für Entry-Cards */
    border: none;
    border-radius: var(--button-border-radius);
    font-size: 0.85rem;
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-edit {
    background: #17a2b8;
    color: white;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-edit svg, .btn-delete svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Link Input Groups */
.form-group input[type="text"] + input[type="url"] {
    margin-top: 0.5rem;
}

.form-group input[type="text"][placeholder*="Link-Name"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px dashed #dee2e6;
}

.form-group input[type="url"][placeholder*="https"] {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Email Links in Content */
.entry-content a[href^="mailto:"] {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.entry-content a[href^="mailto:"]:hover {
    text-decoration: underline;
}

/* Database Config Modal */
.modal-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.config-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

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

.tab-content input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

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

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

#db-config-btn svg {
    margin-right: 0.25rem;
}

/* AI Preview Modal */
.ai-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.ai-warning h4 {
    color: #d35400;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.ai-warning p {
    color: #856404;
    margin: 0;
    font-size: 0.9rem;
}

.preview-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.preview-field {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.preview-field:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.preview-field label {
    display: block;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.preview-field span, .preview-field div {
    color: #212529;
    font-size: 1rem;
    line-height: 1.5;
}

#preview-content {
    white-space: pre-line;
    background: white;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

#preview-links {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.preview-link {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #e3f2fd;
    border-radius: 4px;
    text-decoration: none;
    color: #1976d2;
}

.preview-link:last-child {
    margin-bottom: 0;
}

/* Expired Entries Modal */
.modal-large .modal-content {
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.expired-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #856404;
}

.expired-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.expired-entry-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.3s;
}

.expired-entry-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.expired-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.expired-category {
    background: #6c757d;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.expired-days {
    background: #dc3545;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.expired-title {
    color: #495057;
    font-size: 1rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.expired-content {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.expired-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: #868e96;
}

.btn-delete-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--button-height);
    padding: var(--button-padding-y) var(--button-padding-x);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: var(--button-border-radius);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    white-space: nowrap;
}

.btn-delete-single:hover {
    background: #c82333;
}

.no-expired {
    text-align: center;
    color: #28a745;
    font-size: 1.2rem;
    padding: 2rem;
    background: #d4edda;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

.error {
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 6px;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem 0;
    margin-top: 3rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.footer-section {
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: #3498db;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.footer-section p {
    margin-bottom: 0.8rem;
    color: #ecf0f1;
}

.footer-section a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #5dade2;
    text-decoration: underline;
}

.footer-legal {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.legal-section h4 {
    color: #95a5a6;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.legal-section p {
    font-size: 0.85rem;
    color: #bdc3c7;
    text-align: justify;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #95a5a6;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

.admin-login-link {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.admin-login-link:hover {
    opacity: 1;
    color: white;
}

.version-link {
    background: transparent;
    border: none;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    font-family: inherit;
    padding: 0;
}

.version-link:hover {
    opacity: 1;
    color: white;
}

/* Changelog Modal Styles */
.changelog-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.changelog-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.changelog-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.changelog-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

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

.changelog-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.changelog-section li:before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.changelog-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
    }
    
    .footer-legal {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        margin-left: 0;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Erlaubt Umbrechen auf sehr kleinen Bildschirmen */
    gap: 1rem;
}

/* Stelle sicher, dass header-actions als horizontale Einheit behandelt wird */
.main-header .container > .header-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: center !important;
}


.logo {
    font-size: 2rem;
    font-weight: bold;
}

/* Buttons - Haupt-Buttons (konsolidiert mit Button-Basis) */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    min-height: var(--button-height);
    padding: var(--button-padding-y) calc(var(--button-padding-x) * 1.5);
    border: none;
    border-radius: var(--button-border-radius);
    font-size: var(--button-font-size);
    font-weight: 600; /* Etwas fetter für Haupt-Buttons */
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #e53e3e;
    transform: translateY(-2px);
}

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

/* Newsletter Grid */
.newsletter-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Sidebar */
.categories-sidebar {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.categories-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-list {
    list-style: none;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--button-height);
    padding: var(--button-padding-y) var(--button-padding-x);
    border: none;
    background: transparent;
    text-align: left;
    border-radius: var(--button-border-radius);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.category-btn:hover {
    background-color: var(--bg-color);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.count {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Entries */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.entry-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 1 !important; /* Stelle sicher, dass Karten immer sichtbar sind */
}

.entry-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.entry-card.priority {
    border-left: 5px solid var(--accent-color);
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.priority-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* DSGVO Badge für Token-geschützte Einträge */
.dsgvo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.dsgvo-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.dsgvo-icon {
    width: 20px;
    height: 20px;
    display: block;
    opacity: 0.85;
}

.dsgvo-badge:hover .dsgvo-icon {
    opacity: 1;
}

/* Wenn beide Badges vorhanden sind (DSGVO + Deadline), verschiebe Priority-Badge nach unten */
.entry-card:has(.dsgvo-badge) .priority-badge {
    top: 45px;
    right: 10px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    cursor: wait;
}

.loading-spinner {
    text-align: center;
    background: white;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.entry-title {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.entry-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.deadline-info {
    background-color: #fef5e7;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #f6ad55;
}

.entry-links {
    margin-bottom: 1rem;
}

.entry-link {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.entry-link:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.entry-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.entry-meta small {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Expiry Info Styling */
.expiry-info {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.expiry-date {
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #e9ecef;
    color: #495057;
    white-space: nowrap;
}

.expiry-date.expiry-soon {
    background: #fff3cd;
    color: #856404;
}

.expiry-date.expiry-warning {
    background: #f8d7da;
    color: #721c24;
    font-weight: 700;
    animation: pulse 2s infinite;
}

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

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
}

.close:hover {
    color: var(--accent-color);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Checkbox Label Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-label:hover {
    border-color: var(--secondary-color);
    background: rgba(66, 153, 225, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.checkbox-label span {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

/* Migration Modal Styling */
.migration-status {
    min-height: 150px;
    padding: 1rem;
}

.migration-results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.migration-results th,
.migration-results td {
    padding: 0.75rem;
    text-align: left;
}

.migration-results thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.migration-results tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.migration-results tbody tr:hover {
    background: #f8f9fa;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Migration Tabs */
.migration-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.migration-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.migration-tab-btn:hover {
    color: var(--primary-color);
    background: rgba(44, 82, 130, 0.05);
}

.migration-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.migration-content {
    display: none;
    padding: 1rem 0;
}

.migration-content.active {
    display: block;
}

.migration-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.migration-content > p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
}

.form-toggle {
    margin-top: 0.5rem;
}

.form-toggle input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .categories-sidebar {
        position: static;
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }
}

/* GSAP Animation Classes */
.fade-in {
    opacity: 0;
}

.slide-up {
    transform: translateY(50px);
    opacity: 0;
}

.scale-in {
    transform: scale(0.8);
    opacity: 0;
}