/* ==========================================================================
   SERVERTAG AUF PL - MODERN UI/UX THEME (2026)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Moderne Farbpalette */
    --bg-main: #f8fafc;        
    --bg-surface: #ffffff;     
    --primary: #0f172a;        
    --primary-hover: #1e293b;
    --accent: #3b82f6;         
    --accent-glow: rgba(59, 130, 246, 0.4);
    
    /* Typografie & Text */
    --text-main: #334155;
    --text-muted: #64748b;
    --text-heading: #0f172a;
    
    /* UI Elemente */
    --border-light: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    /* Moderne softe Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Verhindert versehentliches horizontales Scrollen auf der ganzen Seite */
}

/* Verhindert, dass lange Namen/Titel das Layout sprengen */
h1, h2, h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* --- Header & Navigation (Sleek Dark Mode) --- */
header {
    background-color: var(--primary);
    color: white;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

nav a:hover, nav a:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
}

/* Aktiver Link / Admin Indikator */
nav a[style*="color"] {
    background-color: var(--accent);
    color: white !important;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* --- Content Area --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeIn 0.4s ease-out;
}

h2 {
    color: var(--text-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

p {
    color: var(--text-muted);
}

/* Globale Link-Stylings (repariert die unschönen blauen HTML-Links) */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* --- Interaktives Sitzdiagramm (Halbkreis Clean) --- */
.parliament-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.parliament-container {
    position: relative;
    width: 700px;
    height: 350px;
    margin: 0 auto;
}

.seat-dot {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translate(-50%, -50%);
    box-shadow: inset 0 -2px 6px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

.seat-dot:hover, .seat-dot:focus {
    transform: translate(-50%, -50%) scale(1.4);
    z-index: 10;
    border-color: #ffffff;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    outline: none;
}

/* Text in der Mitte des Halbkreises */
.seat-total {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-heading);
    font-family: 'Inter', sans-serif;
}

.seat-total strong {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    letter-spacing: -1px;
}

.seat-total span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Moderne Legende (Pill-Design) */
.legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
    background: var(--bg-main);
    padding: 6px 14px 6px 6px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    transition: transform 0.2s;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: inset 0 -1px 3px rgba(0,0,0,0.2);
}

/* --- Premium Tooltip (Dark Glassmorphism) --- */
.tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 16px;
    font-size: 0.85em;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    z-index: 1000;
    min-width: 180px;
    transform: translateY(0);
    transition: opacity 0.2s, transform 0.2s;
}

.tooltip.hidden {
    display: block; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.tooltip strong {
    color: #ffffff;
    display: block;
    margin-bottom: 6px;
    font-size: 1.2em;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
}

/* --- Tabellen (SaaS Style) --- */
table.bt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 30px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

table.bt-table th, table.bt-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

table.bt-table th {
    background-color: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table.bt-table tr:last-child td {
    border-bottom: none;
}

table.bt-table tr:hover td {
    background-color: var(--bg-main);
}

/* Tabellen-Links optisch aufwerten */
table.bt-table a {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
table.bt-table a:hover {
    text-decoration: underline;
}

/* --- Formulare & Buttons --- */
.bt-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-main);
    transition: all 0.2s;
    box-sizing: border-box;
}

.bt-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.bt-button {
    background-color: var(--primary);
    color: white !important;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    text-decoration: none;
}

.bt-button:hover, .bt-button:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* ==========================================================================
   SMARTPHONE OPTIMIERUNG (RESPONSIVE MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    /* Header kompakt */
    header { flex-direction: column; gap: 12px; text-align: center; padding: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 6px; }
    nav a { padding: 8px 14px; font-size: 0.85rem; }

    .container { margin: 20px auto; padding: 0 12px; }

    /* --- PLENARSAAL REPARATUR --- */
    .parliament-wrapper { 
        padding: 30px 0; 
        overflow: hidden; /* Zwingend nötig, damit der 700px Container die Seite nicht verbreitert */
        border-radius: var(--radius-md);
    }
    
    .parliament-container {
        /* Perfekte mathematische Zentrierung VOR dem Skalieren */
        left: 50%;
        transform: translateX(-50%) scale(0.43); 
        transform-origin: top center;
        height: 150px; 
        margin-bottom: 10px;
    }
    .seat-total strong { font-size: 2.2rem; }

    /* --- TABELLEN REPARATUR --- */
    table.bt-table { 
        display: block; 
        width: 100%; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        border-right: none; 
        border-left: none;
        border-radius: 0; /* Nimmt die Ränder weg, damit man geschmeidig wischen kann */
    }
    table.bt-table th, table.bt-table td {
        white-space: nowrap; /* Zwingt die Tabelle, horizontal zu bleiben (Wisch-Effekt) */
        padding: 12px 15px;
    }

    /* --- PROFIL REPARATUR --- */
    /* Zwingt die Boxen im Profil in einspaltige Layouts */
    div[style*="display: flex; gap: 30px;"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 25px 15px !important;
        gap: 15px !important;
    }
    div[style*="display: flex; gap: 30px;"] img, 
    div[style*="display: flex; gap: 30px;"] div[style*="width: 180px"] {
        margin: 0 auto !important;
    }
    div[style*="display: flex; gap: 15px;"] {
        justify-content: center !important;
    }
    
    .bt-button {
        width: 100%;
        text-align: center;
    }
}

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