* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5; margin: 0; padding: 0;
    display: flex; flex-direction: column; align-items: center; color: #333;
}
.center-layout { justify-content: center; min-height: 100vh; }

.header {
    width: 100%; background: #0C2340; color: white;
    padding: 20px 0; text-align: center;
    font-size: 28px; font-weight: bold; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.container {
    width: 90%; max-width: 800px; background: white;
    border-radius: 12px; padding: 40px; margin-top: 40px; margin-bottom: 40px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* KVIZ I INDEX (Vraćen originalni dizajn!) */
.text-center { text-align: center; }
.text-left { text-align: left; }
h1 { margin-top: 0; color: #0C2340; }
.subtitle { font-size: 18px; color: #555; }
.disclaimer-box { background: #fff3cd; border-left: 6px solid #ffc107; padding: 20px; margin: 30px 0; border-radius: 4px; }
.disclaimer-box h3 { color: #856404; margin-top: 0; }
.btn-start { background: #0C2340; color: white; padding: 15px 40px; font-size: 22px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.btn-start:hover { background: #1a4375; transform: scale(1.05); }

.progress-container { width: 100%; background: #e0e0e0; border-radius: 10px; height: 12px; margin-bottom: 30px; }
.progress-bar { height: 100%; background: #0C2340; border-radius: 10px; width: 0%; transition: width 0.4s ease; }
.question-text { font-size: 24px; font-weight: 600; text-align: center; margin-bottom: 40px; min-height: 100px; }
.btn-group { display: flex; flex-direction: column; gap: 15px; }
.btn { padding: 18px; font-size: 20px; font-weight: bold; color: white; border: none; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.btn:active { transform: scale(0.98); }
.btn:hover { filter: brightness(1.1); }
.btn-1 { background-color: #1b5e20; } 
.btn-2 { background-color: #4caf50; } 
.btn-3 { background-color: #9e9e9e; } 
.btn-4 { background-color: #f44336; } 
.btn-5 { background-color: #b71c1c; } 
.progress-text { text-align: center; margin-top: 20px; color: #666; font-weight: bold; }

/* REZULTATI - 8VALUES */
.section-title { font-size: 24px; border-bottom: 2px solid #0C2340; padding-bottom: 10px; margin-top: 40px; margin-bottom: 20px; }
.axis { margin-bottom: 30px; }
.axis-title { text-align: center; font-size: 20px; font-weight: bold; margin-bottom: 10px; color: #0C2340; }
.bar-container { display: flex; align-items: center; width: 100%; height: 40px; border-radius: 20px; overflow: hidden; background: #ddd; box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); }
.bar-left { height: 100%; display: flex; align-items: center; padding-left: 15px; color: white; font-weight: bold; font-size: 18px; text-shadow: 1px 1px 2px black; transition: width 1s ease;}
.bar-right { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 15px; color: white; font-weight: bold; font-size: 18px; text-shadow: 1px 1px 2px black; transition: width 1s ease; }
.econ-left { background-color: #f44336; } .econ-right { background-color: #00897b; }
.state-left { background-color: #03a9f4; } .state-right { background-color: #ff9800; }
.soc-left { background-color: #9c27b0; } .soc-right { background-color: #795548; }
.for-left { background-color: #3f51b5; } .for-right { background-color: #607d8b; }
.axis-labels { display: flex; justify-content: space-between; margin-top: 5px; font-weight: bold; color: #555; }

/* REZULTATI - KOMPAS & KARTICE */
.chart-container { width: 100%; max-width: 600px; margin: 0 auto 40px auto; }
.party-card { background: #f9f9f9; padding: 20px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.party-card h2 { margin-top: 0; margin-bottom: 5px; }

details { margin-top: 15px; background: #fff; border: 1px solid #ddd; padding: 10px; border-radius: 5px; cursor: pointer; }
summary { font-weight: bold; outline: none; }
.details-content { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ccc; font-size: 14px; }
.rc-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.vote-ZA { color: green; font-weight: bold; }
.vote-PROTIV { color: red; font-weight: bold; }
.vote-SUZDRZAN, .vote-SUZDRŽAN { color: gray; font-weight: bold; }

/* REZULTATI - SPIRITUALNI LJUDI (NOVI, PRELIJEP DIZAJN KARTICA) */
.politician-list { display: flex; flex-direction: column; gap: 15px; }
.pol-card {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; padding: 15px 20px; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); border: 1px solid #eee;
}
.pol-info h3 { margin: 0 0 5px 0; font-size: 18px; color: #0C2340; }
.pol-info p { margin: 0; font-size: 14px; color: #666; font-weight: 500; }
.pol-btn {
    background: #f1f5f9; color: #0C2340; text-decoration: none;
    padding: 12px 18px; border-radius: 8px; font-weight: bold; font-size: 14px; transition: 0.2s;
}
.pol-btn:hover { background: #e2e8f0; transform: translateY(-2px); }

/* Dugme za share */
.btn-share {
    background: #E1306C; color: white; padding: 15px 30px; margin-top: 20px;
    font-size: 18px; border: none; border-radius: 8px; cursor: pointer;
    font-weight: bold; width: 100%; display: block; text-align: center;
}
.btn-share:hover { background: #C13584; }

/* DISCLAIMER FOOTER */
.disclaimer-footer {
    margin-top: 60px;
    margin-bottom: 20px;
    padding: 25px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    border-left: 5px solid #0C2340;
}
.disclaimer-footer h3 {
    color: #0C2340;
    margin-top: 0;
    font-size: 20px;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 10px;
}
.disclaimer-footer p {
    margin-bottom: 15px;
}
.disclaimer-footer a {
    color: #1a4375;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.disclaimer-footer a:hover {
    color: #e6683c;
    text-decoration: underline;
}
/* DISCLAIMER FOOTER */
.disclaimer-footer {
    margin-top: 50px;
    margin-bottom: 20px;
    padding: 25px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    border-left: 5px solid #0C2340;
}
.disclaimer-footer h3 {
    color: #0C2340;
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.disclaimer-footer p { margin-bottom: 12px; }
.disclaimer-footer a { color: #1a4375; font-weight: 700; text-decoration: none; }
.disclaimer-footer a:hover { text-decoration: underline; color: #dc2626; }

.index-footer {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}
.index-footer a {
    color: #1a4375;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.index-footer a:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* centriramo kompas */
body.export-mode .chart-container {
    margin: 20px auto !important;
    width: 100% !important;
    max-width: 750px !important;
    position: static !important;
    display: flex !important;
    justify-content: center !important;
}

body.export-mode canvas#compassChart {
    margin: 0 auto !important;
}

/* =========================================
   OPTIMIZACIJA ZA MOBILNE UREĐAJE (100% ŠIRINA I TAČNA SLIKA)
   ========================================= */
@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    /* Na mobitelu, glavni kontejner ide od ruba do ruba ekrana */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 15px 10px !important;
        box-shadow: none !important;
    }

    /* Kontejner grafikona sada prirodno zauzima sav prostor */
    .chart-container {
        position: relative !important;
        width: calc(100% + 20px) !important;
        max-width: none !important;
        margin: 0 -10px 30px -10px !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    /* Prisiljavamo Canvas da sluša širinu bez zbunjivanja */
    canvas#compassChart {
        width: 100% !important;
        height: auto !important;
    }
    
    /* Sitna uljepšavanja fontova za mobitel */
    .section-title { font-size: 22px; margin-top: 30px; }
    .axis-title { font-size: 16px; margin-bottom: 8px; }
    .bar-container { height: 35px; }
    .bar-left, .bar-right { font-size: 14px; padding: 0 10px; }
    .axis-labels { font-size: 11px; }
    
    .pol-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
    }
    .pol-btn { width: 100%; text-align: center; }

}
