/* =========================================
   MECLİS GENEL DÜZENİ
   ========================================= */
.parliament-layout {
    padding: 20px;
    /* DÜZELTME 1: Alt boşluğu artırdık (Kırmızı çizgi isteği) */
    padding-bottom: 100px; 
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* GRID SİSTEMİ */
.parliament-grid-system {
    display: grid;
    grid-template-columns: 3fr 1.2fr;
    gap: 20px;
    grid-template-areas:
        "hemi right"
        "bills parties";
}

/* KUTULARIN ORTAK STİLİ */
.grid-area-hemicycle, .grid-area-right-panel, .grid-area-bills, .grid-area-parties {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex; flex-direction: column;
}

/* 1. HEMICYCLE (GRAFİK ALANI - DÜZELTİLDİ) */
.grid-area-hemicycle {
    grid-area: hemi;
    /* Flex yapısı ile içerikleri dikeyde yayıyoruz */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Başlık üstte, Legend altta, Grafik ortada kalsın */
    padding: 0; 
    overflow: hidden;
    min-height: 420px; /* Grafik rahat sığsın diye biraz yükselttik */
}

/* --- ENTEGRE HEADER --- */
.integrated-header {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, rgba(20,30,45,0.8) 0%, rgba(20,30,45,0) 100%);
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; /* Başlık sıkışmasın */
}
.state-info { display: flex; align-items: center; gap: 20px; }
.state-flag { height: 45px; border-radius: 4px; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.state-info h1 { font-size: 1.5rem; color: var(--text-light); margin-bottom: 3px; }
.regime-tag { background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; color: var(--text-dim); }

.actions { display: flex; gap: 10px; }
.action-btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; color: white; display: flex; align-items: center; gap: 8px; transition: 0.2s; font-size: 0.9rem; }
.action-btn:hover { transform: translateY(-2px); }
.action-btn.red { background: #ef4444; } .action-btn.blue { background: #3b82f6; }

/* GRAFİK ALANI */
.hemicycle-wrapper {
    width: 100%; 
    height: 250px; 
    position: relative; 
    display: flex; 
    justify-content: center;
    margin-top: 30px; 
    margin-bottom: auto;
}

.seat-dot {
    position: absolute;
    /* DÜZELTME: Noktalar biraz daha büyük olsun */
    width: 12px; height: 12px; 
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
    transition: 0.2s; cursor: pointer;
    transform: translate(-50%, 50%);
}
.seat-dot:hover { transform: translate(-50%, 50%) scale(2); z-index: 10; box-shadow: 0 0 10px white; }

.seat-legend { 
    display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; 
    padding: 15px; background: rgba(0,0,0,0.2); width: 100%; 
    /* Legend en altta sabit kalsın */
    margin-top: auto; 
    flex-shrink: 0;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; }


/* 2. SAĞ PANEL */
.grid-area-right-panel { grid-area: right; gap: 30px; }
.sub-panel { display: flex; flex-direction: column; gap: 10px; }
.panel-header { margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.panel-header h3 { font-size: 1rem; color: var(--text-light); font-weight: 700; display: flex; align-items: center; gap: 10px; }

/* Logs & Polls */
.logs-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.log-item { display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.log-item:last-child { border: none; }
.log-item i { font-size: 1.2rem; margin-top: 3px; }
.log-item.passed i { color: #4ade80; } .log-item.failed i { color: #f87171; }
.log-item div { display: flex; flex-direction: column; }
.log-item strong { color: var(--text-light); font-size: 0.9rem; }
.log-item small { color: var(--text-dim); font-size: 0.75rem; }

.polls-list { display: flex; flex-direction: column; gap: 12px; }
.poll-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.poll-name { width: 90px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poll-track { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; }
.poll-fill { height: 100%; background: var(--primary); border-radius: 3px; }
.poll-val { display: flex; flex-direction: column; align-items: flex-end; width: 40px; }
.poll-val span { font-weight: 700; color: var(--text-light); }
.poll-val small { font-size: 0.7rem; }
.green { color: #4ade80; } .red { color: #f87171; }

/* 3. BILLS */
.grid-area-bills { grid-area: bills; }
.bills-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.bill-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.bill-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-dim); }
.bill-card h4 { color: var(--text-light); font-size: 1rem; }
.vote-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #333; margin: 5px 0; }
.yes { background: #4ade80; } .no { background: #f87171; } .abs { background: #cbd5e1; }
.bill-actions { display: flex; gap: 10px; }
.vote-btn { flex: 1; border: none; padding: 6px; border-radius: 4px; font-weight: 700; font-size: 0.75rem; cursor: pointer; transition: 0.2s; }
.vote-btn.yes { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid #4ade80; }
.vote-btn.no { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid #f87171; }
.vote-btn:hover { background: currentColor; color: #000; }

/* 4. PARTIES LIST */
.grid-area-parties { grid-area: parties; }

.parliament-parties-list {
    display: flex; flex-direction: column; gap: 8px;
    /* DÜZELTME: Liste yüksekliğini kıstık */
    max-height: 200px; 
    overflow-y: auto;
}

.list-group-title { font-size: 0.7rem; color: var(--text-dim); font-weight: 800; margin-top: 10px; margin-bottom: 5px; letter-spacing: 1px; }
.list-group-title:first-child { margin-top: 0; }
.pp-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.02); padding: 8px; border-radius: 6px; border: 1px solid transparent; }
.pp-row:hover { border-color: var(--border); background: rgba(255,255,255,0.05); }
.pp-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pp-name { flex: 1; font-size: 0.9rem; color: #cbd5e1; }
.pp-seats { font-size: 0.9rem; font-weight: 700; color: var(--text-light); }
.pp-seats small { font-size: 0.7rem; color: var(--text-dim); font-weight: 400; }
.pp-row.out .pp-name { color: var(--text-dim); }

/* MOBİL */
@media (max-width: 900px) {
    .parliament-grid-system {
        grid-template-columns: 1fr;
        grid-template-areas: "hemi" "right" "bills" "parties";
    }
    .hemicycle-wrapper { height: 250px; }
}

/* Modal */
.const-body { padding: 30px; }
.const-body h2 { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.const-list li { margin-bottom: 10px; padding: 10px; background: rgba(255,255,255,0.05); border-radius: 6px; color: #cbd5e1; }