/* =========================================
   Basis & Variablen - Monochrom, Eckig, Seriös
   ========================================= */
:root {
    --bg-main: #121212;
    --bg-panel: #1e1e1e;
    --border-color: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --accent: #555555;
    
    /* Kräftige, klare Voting-Farben */
    --color-yess: #15803d;
    --color-yes:  #22c55e;
    --color-neutral: #eab308;
    --color-no:   #ef4444;
    --color-noo:  #b91c1c;
}

/* Dezentere Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #444444; }
::-webkit-scrollbar-thumb:hover { background: #666666; }

body {
    margin: 0; 
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1000px; /* Begrenzt, damit die Zeilen nicht unendlich lang werden */
    margin: 0 auto;
}

.quiz-width { max-width: 600px; margin: 0 auto; }
.full-width { width: 100%; }
.text-center { text-align: center; }

/* =========================================
   Panels (Strikt eckig, flache Farben)
   ========================================= */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 0; 
}

.panel-inner {
    background: #171717;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 15px;
}

.screen { display: none; }
.screen.active { display: block; }

/* =========================================
   Typografie
   ========================================= */
h1, h2, h3 { 
    margin: 0 0 15px 0; 
    font-weight: 600; 
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p { 
    color: var(--text-secondary); 
    line-height: 1.6; 
    margin-bottom: 25px; 
}

#logo-container { text-align: center; margin-bottom: 30px; }
#logo { max-width: 280px; filter: grayscale(20%); }

#question {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0;
    font-weight: normal;
}

/* =========================================
   Buttons (Flach, Eckig)
   ========================================= */
button { 
    border: 1px solid var(--border-color); 
    cursor: pointer; 
    color: var(--text-primary); 
    font-family: inherit; 
    background: #252525;
    border-radius: 0; 
    transition: background 0.1s ease-in-out;
}
button:hover { background: #333333; }

.btn { 
    width: 100%; 
    padding: 15px; 
    font-size: 1rem; 
    margin-top: 10px; 
}

.btn-primary { 
    width: 100%; 
    padding: 15px; 
    font-size: 1.1rem; 
    font-weight: bold; 
    background: #dddddd; 
    color: #000000; 
    text-transform: uppercase; 
}
.btn-primary:hover { background: #ffffff; }

/* Kräftige Farben für das Voting im Quiz */
.yess { background: var(--color-yess); color: #ffffff; border-color: #14532d; }
.yes { background: var(--color-yes); color: #000000; border-color: #16a34a; }
.neutral { background: var(--color-neutral); color: #000000; border-color: #ca8a04; }
.no { background: var(--color-no); color: #ffffff; border-color: #dc2626; }
.noo { background: var(--color-noo); color: #ffffff; border-color: #7f1d1d; }
.back { background: transparent; border: 1px solid #555555; color: var(--text-secondary); margin-top: 25px; }

/* =========================================
   Fortschrittsanzeige
   ========================================= */
.top { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; }
.badge { background: #111111; border: 1px solid var(--border-color); padding: 5px 10px; font-size: 0.9rem; }
.progress { flex-grow: 1; height: 6px; background: #111111; border: 1px solid var(--border-color); }
#bar { height: 100%; width: 0; background: #888888; transition: width 0.3s ease; }

/* =========================================
   Dashboard Navigation
   ========================================= */
.dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.dash-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
}

.dash-btn.active { background: #dddddd; color: #000000; border-color: #dddddd; }
.dash-btn.restart { margin-left: auto; border-color: #663b3b; color: #ff9999; }
.dash-btn.restart:hover { background: var(--color-noo); color: #ffffff; }

.dash-view { display: none; }
.dash-view.active { display: block; }

/* =========================================
   Ergebnis-Liste (Eine Fraktion pro Zeile)
   ========================================= */
.result-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.resultRow {
    background: #171717;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.resultHeader { display: flex; align-items: center; gap: 15px; font-size: 1.1rem; font-weight: normal; margin-bottom: 15px; }
.partyLogo { width: 35px; height: 35px; border-radius: 0; filter: grayscale(10%); }

.fill-container { 
    background: #111111; 
    height: 30px; 
    border: 1px solid var(--border-color); 
    position: relative;
}

.fill {
    background: #444444; 
    height: 100%;
}

/* =========================================
   Tuning Layout
   ========================================= */
.tuning-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tuning-question { flex: 1; font-size: 1rem; line-height: 1.5; }
.tuning-buttons { display: flex; gap: 5px; }

.t-btn {
    width: 45px; height: 45px; 
    font-weight: bold; font-size: 1rem;
}

/* Aktive Tuning Buttons mit kräftigen Farben */
.t-btn.active { border: 2px solid #ffffff; }
.t-btn.active.yess { background: var(--color-yess); color: #ffffff; }
.t-btn.active.yes { background: var(--color-yes); color: #000000; }
.t-btn.active.neutral { background: var(--color-neutral); color: #000000; }
.t-btn.active.no { background: var(--color-no); color: #ffffff; }
.t-btn.active.noo { background: var(--color-noo); color: #ffffff; }

/* =========================================
   Begründungen Grid (Akkordeon)
   ========================================= */
.thesis { margin-top: 15px; padding: 0; border: none; background: transparent; }

.thesis-toggle {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: #1e1e1e;
    font-size: 1.1rem;
    font-weight: normal;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.thesis-toggle:hover { background: #252525; }

.q-arrow { font-size: 0.8rem; transition: transform 0.2s; color: #888888; }
.thesis-toggle.open .q-arrow { transform: rotate(180deg); }

.partyGrid { 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 15px; 
    padding: 15px;
    background: #141414;
    border: 1px solid var(--border-color);
    border-top: none;
}

.partyBox { padding: 20px; background: #1a1a1a; border: 1px solid var(--border-color); }
.partyBox-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: bold; }
.mini-logo { width: 30px; height: 30px; border-radius: 0; filter: grayscale(10%); }

.partyPosition { 
    padding: 8px; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    text-align: center; 
    margin-bottom: 12px; 
    border: 1px solid var(--border-color); 
}

.partyToggle { width: 100%; padding: 10px; font-size: 0.85rem; }
.partyDetail { 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px solid var(--border-color); 
    color: #cccccc; 
    line-height: 1.6; 
    font-size: 0.9rem; 
}

/* Farbzuweisung Positionen */
.pos-yess { background: var(--color-yess); color: #ffffff; border-color: #14532d; }
.pos-yes { background: var(--color-yes); color: #000000; border-color: #16a34a; }
.pos-neutral { background: var(--color-neutral); color: #000000; border-color: #ca8a04; }
.pos-no { background: var(--color-no); color: #ffffff; border-color: #dc2626; }
.pos-noo { background: var(--color-noo); color: #ffffff; border-color: #7f1d1d; }
.pos-none { background: #111111; color: var(--text-secondary); }

/* =========================================
   Support Sidebar
   ========================================= */
#supportBox { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    width: 250px; 
    background: var(--bg-panel); 
    border: 1px solid var(--border-color); 
    padding: 20px; 
    z-index: 100; 
}

#supportBox h3 { 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px; 
    margin-bottom: 15px; 
}

.supportItem { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; font-size: 0.85rem; padding: 5px 0; }
.supportItem img { width: 24px; height: 24px; filter: grayscale(50%); border-radius: 0; }

/* =========================================
   Responsive Anpassungen
   ========================================= */
@media(max-width: 1650px) {
    #supportBox { 
        position: relative; 
        top: auto; 
        right: auto; 
        width: 100%; 
        margin-top: 50px; 
        display: flex; 
        flex-wrap: wrap; 
        gap: 10px; 
        padding: 20px; 
        justify-content: flex-start; 
    }
    #supportBox h3 { width: 100%; border: none; margin-bottom: 5px; }
    .supportItem { width: auto; background: #1a1a1a; border: 1px solid var(--border-color); padding: 10px 15px; margin: 0; }
}

@media(max-width: 900px) {
    .tuning-row { flex-direction: column; align-items: flex-start; }
    .tuning-buttons { width: 100%; justify-content: space-between; margin-top: 10px; }
    .t-btn { flex: 1; height: 50px; }
    .dash-btn.restart { margin-left: 0; width: 100%; margin-top: 10px; }
}

@media(max-width: 600px) {
    body { padding: 10px; }
    .panel { padding: 20px; }
    .dashboard-nav { flex-direction: column; gap: 5px; }
    .dash-btn { width: 100%; text-align: center; }
}