* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}


body {
    margin: 0;
    padding: 0;
    background: #f2f4f8;
    color: #222;
}



header {
    background: #1d3557;
    color: white;
    text-align: center;
    padding: 30px 20px;
}


header h1 {
    margin: 0;
    font-size: 32px;
}


header p {
    font-size: 18px;
}




main {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}



.card {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}



.hidden {
    display: none;
}




button {

    width: 100%;
    padding: 15px;
    margin-top: 15px;

    border: none;
    border-radius: 10px;

    background: #457b9d;
    color: white;

    font-size: 18px;
    cursor: pointer;

    transition: 0.3s;
}



button:hover {

    background: #1d3557;

}




#answers button {

    background: #edf2f4;
    color: #222;
    border: 2px solid #ddd;

}



#answers button:hover {

    background: #a8dadc;

}




.progress-container {

    width: 100%;
    height: 15px;

    background: #ddd;

    border-radius: 10px;

    overflow: hidden;

    margin-bottom: 15px;

}



#progress-bar {

    height: 100%;

    width: 0%;

    background: #2a9d8f;

    transition: 0.4s;

}




#progress-text {

    text-align: center;

    margin-bottom: 20px;

    font-weight: bold;

}




.navigation {

    display: flex;

    gap: 15px;

}



.navigation button {

    width: 50%;

}




#results {

    margin-top: 25px;

}



.result-card {

    padding: 20px;

    margin: 15px 0;

    border-radius: 10px;

    background: #f1faee;

    border-left: 6px solid #457b9d;

}



.result-card h3 {

    margin-top: 0;

}




footer {

    text-align: center;

    padding: 20px;

    color: #555;

}




@media(max-width:600px){


    main {

        margin: 20px auto;

        padding: 10px;

    }


    .card {

        padding: 20px;

    }


    header h1 {

        font-size: 25px;

    }


    .navigation {

        flex-direction: column;

    }


    .navigation button {

        width: 100%;

    }


}
.bar{

    width:100%;
    height:15px;
    background:#ddd;
    border-radius:10px;
    overflow:hidden;
    margin-bottom:15px;

}


.fill{

    height:100%;
    background:#2a9d8f;

}.analysis-columns{

    display:flex;
    gap:20px;

}


.analysis-columns > div{

    flex:1;

}


.analysis-item{

    background:#f1faee;

    padding:10px;

    margin:10px 0;

    border-radius:8px;

}



@media(max-width:800px){

    .analysis-columns{

        flex-direction:column;

    }

}

/* IDEOLOŠKA SKALA TABELA */

#scale-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}


#scale-table th,
#scale-table td {

    border: 1px solid #ccc;
    padding: 12px;
    text-align: center;

}


#scale-table th {

    background-color: #2a9d8f;
    color: white;
    font-weight: bold;

}


#scale-table tr:nth-child(even){

    background-color: #f5f5f5;

}


#scale-table tr:hover{

    background-color: #e8f4f3;

}

canvas{
    display:block;
    margin:20px auto;
    background:white;
    border:1px solid #333;
    border-radius:8px;
    max-width:100%;
}

#partyLegend{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    margin-bottom:20px;
}

#chart-tooltip {
    position: fixed;
    display: none;

    background: white;
    color: black;

    border: 1px solid #333;
    border-radius: 6px;

    padding: 8px 12px;

    font-size: 14px;
    line-height: 1.5;

    box-shadow: 0 3px 10px rgba(0,0,0,0.2);

    z-index: 9999;

    white-space: nowrap;

    pointer-events: none;
}

.eu-group-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;

    padding: 20px;
    margin: 15px 0;

    background: #f1faee;

    border-radius: 10px;

    border-left: 6px solid #457b9d;
}


.eu-group-info h3 {
    margin-top: 0;
}


.eu-group-info p {
    margin: 8px 0;
}


.eu-party-list {
    background: white;

    padding: 15px;

    border-radius: 8px;

    max-height: 250px;

    overflow-y: auto;
}


.eu-party-list h4 {
    margin-top: 0;
    margin-bottom: 10px;
}


.eu-party {
    padding: 5px 0;

    border-bottom: 1px solid #ddd;
}


.eu-no-parties {
    color: #777;
}


@media(max-width:700px){

    .eu-group-card {
        grid-template-columns: 1fr;
    }

}

.start-bottom {
    margin-top: 40px;
    text-align: right;
}

.start-bottom button {
    width: auto;
    padding: 10px 18px;
    font-size: 15px;
}

.start-bottom p {
    font-size: 14px;
    margin-top: 15px;
}

.ratings-table-wrapper {
    overflow-x: auto;
    margin-top: 25px;
}

.ratings-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}

.ratings-table th,
.ratings-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.ratings-table th {
    background: #2a9d8f;
    color: white;
}

.ratings-table td:first-child {
    text-align: left;
    min-width: 350px;
    max-width: 500px;
}

.ratings-table tr:nth-child(even) {
    background: #f5f5f5;
}