/* ---------------------------------- */
/* --- 1. GRUNDEINSTELLUNGEN & VARIABLEN --- */
/* ---------------------------------- */
:root {
    --bg-main: #111827;
    --bg-card-rgb: 31, 41, 55; /* RGB für rgba() Transparenz */
    --bg-input: rgba(17, 24, 39, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --accent-blue: #3B82F6;
    --dark-gray: #4b5563;
    --status-green: #10B981;
    --status-yellow: #F59E0B;
    --status-red: #EF4444;
    --alert-green: rgba(16, 185, 129, 0.2);
    --alert-red: rgba(239, 68, 68, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------------------------------- */
/* --- 2. LAYOUT & HINTERGRUND --- */
/* ---------------------------------- */
@keyframes background-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    background: linear-gradient(90deg, #111827, #1F2937, #374151, #111827);
    background-size: 200% 200%;
    color: var(--text-primary);
    animation: background-pan 15s ease infinite;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    padding: 2rem;
    flex-grow: 1; 
}

.main-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0; /* NEU: Gap wird durch section-spacing geregelt */
}

/* NEU: Hilfsklassen für konsistente Abstände */
.section-spacing-top {
    margin-top: 2rem;
}
.text-center {
    text-align: center;
}

/* ---------------------------------- */
/* --- 3. GLASSMORPHISM CONTAINER --- */
/* ---------------------------------- */
.glass-container {
    background: rgba(var(--bg-card-rgb), 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    /* NEU: Subtile obere Kante für mehr "HUD"-Feeling */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------------------------------- */
/* --- 4. TYPOGRAFIE & BASIS-ELEMENTE --- */
/* ---------------------------------- */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; margin-bottom: 1.25rem; } /* Etwas mehr Abstand */
h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: #60a5fa; }

/* ---------------------------------- */
/* --- 5. KOMPONENTEN-STYLING --- */
/* ---------------------------------- */

/* --- Page Header --- */
/* NEU: Wrapper für Flexbox-Verhalten im Header */
.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Bricht um, falls nicht genug Platz */
    gap: 1rem; /* Abstand zwischen Titel und Button */
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

/* --- Stats-Karten --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.stat-card .icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}
.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
}
.stat-card .label {
    color: var(--text-secondary);
}

/* --- Daten-Tabelle --- */
.data-table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table thead {
    background-color: rgba(0,0,0,0.2);
}

.data-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.data-table tbody tr:hover {
    transform: translateY(-3px);
    background-color: rgba(var(--bg-card-rgb), 0.7);
    cursor: pointer;
}

/* --- Status & Priorität Badges (Zusammengefasst) --- */
.status-badge, .priority-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    text-transform: capitalize;
}
.status-badge.open, .status-badge.geöffnet { background-color: var(--status-green); color: #fff; }
.status-badge.in-progress, .status-badge.in-bearbeitung { background-color: var(--status-yellow); color: #111; }
.status-badge.closed, .status-badge.geschlossen { background-color: var(--status-red); color: #fff; }
.status-badge.dienst { background-color: var(--accent-blue); color: #fff; }

.priority-badge {
    color: #fff;
}
.priority-niedrig { background-color: var(--status-green); }
.priority-normal { background-color: var(--accent-blue); }
.priority-hoch { background-color: var(--status-red); }

/* --- Empty State in Tabelle (NEU) --- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem !important; /* Wichtig, um die Standard-TD-Styles zu überschreiben */
}
.empty-state .empty-state-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    line-height: 1;
}
.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* --- Buttons --- */
/* ... (Button-Sektion bleibt gleich wie bei dir, da sie schon sehr gut ist) ... */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.btn i { line-height: 1; }

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--text-primary);
}
.btn-primary:hover {
    background-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: var(--dark-gray);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: #6b7280;
    transform: translateY(-2px);
}

.btn-discord {
    background-color: #5865F2;
    color: #fff;
}
.btn-discord:hover {
    background-color: #707bf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-icon {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* --- Responsivität --- */
@media (max-width: 768px) {

    /* ... (Allgemeines Layout & Typografie) ... */
    .page-wrapper {
        padding: 1rem;
    }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    .main-container { gap: 0; }
    .section-spacing-top { margin-top: 1.5rem; }

    /* ... (Responsive Tabellen - dein Code ist bereits exzellent) ... */
    .data-table thead {
        display: none;
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        background: rgba(var(--bg-card-rgb), 0.2);
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
    }
    .data-table tr:hover { /* Hover-Effekt auf Mobile zurücksetzen */
        transform: none;
        background-color: rgba(var(--bg-card-rgb), 0.2);
    }
    .data-table td:last-child {
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
        margin-right: 1rem;
    }
    .data-table .action-buttons {
        justify-content: flex-end;
    }

    /* NEU: Leerer Zustand auf Mobile anpassen */
    .empty-state {
        padding: 2rem 1rem !important;
    }
    .empty-state .empty-state-icon {
        font-size: 2.5rem;
    }
}

/* --- AM ENDE DEINER style.css HINZUFÜGEN --- */

/* --- Styling für das "Zugriff verweigert"-Modal --- */
.modal-content {
    padding: 1rem;
}

.modal-icon-error {
    font-size: 4rem;
    color: var(--status-red);
    margin-bottom: 1.5rem;
}

.modal-content h2 {
    font-size: 1.75rem;
}

.modal-text {
    margin-top: 1rem;
    font-size: 1.1rem;
}

.modal-countdown {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.modal-action-btn {
    margin-top: 1rem;
}

/* --- Forum-spezifische Erweiterungen --- */

.upvote-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    background-color: var(--dark-gray);
    transition: all 0.3s ease;
}

.upvote-button:hover {
    background-color: #6b7280;
}

/* Stil für einen bereits gedrückten Upvote-Button */
.upvote-button.active {
    background-color: var(--status-green);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.upvote-button.active:hover {
    background-color: #15a374;
}

.upvote-button .vote-count {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
}

/* Anpassung der Status-Farben für Forum-Logik */
.status-badge.planned { background-color: var(--status-yellow); color: #111; }
.status-badge.declined { background-color: var(--status-red); color: #fff; }
.status-badge.implemented { background-color: var(--accent-blue); color: #fff; }