/* ========== RESET & OSNOVNI STILOVI ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== KONTEJNERI I KARTICE ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card, .welcome-card, .login-card, .voting-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover, .welcome-card:hover, .login-card:hover, .voting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
}

/* ========== NAVIGACIJA ========== */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.navbar-brand small {
    font-size: 0.8rem;
    font-weight: normal;
    opacity: 0.9;
}

/* ========== DUGMAD ========== */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}
.btn-success:hover {
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
}
.btn-warning:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    background: #5a6268;
}

/* ========== TABOVI ========== */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}
.nav-tabs .nav-link {
    border: none;
    color: #495057;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 10px 10px 0 0;
    transition: all 0.2s;
}
.nav-tabs .nav-link:hover {
    border: none;
    color: #667eea;
    background: rgba(102,126,234,0.1);
}
.nav-tabs .nav-link.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
    font-weight: bold;
}
.tab-content {
    background: white;
    padding: 25px;
    border-radius: 0 0 15px 15px;
    border: 1px solid #dee2e6;
    border-top: none;
}

/* ========== FORME I INPUTI ========== */
.form-control, .input-group .form-control {
    border-radius: 12px;
    border: 1px solid #ced4da;
    padding: 12px 15px;
    transition: all 0.2s;
}
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25);
}
.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* ========== RADIO BUTTONI I CHECKBOX ========== */
.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}
.option-radio {
    margin: 15px 0;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 14px;
    transition: all 0.2s;
    cursor: pointer;
}
.option-radio:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(5px);
}

/* ========== QR KOD ========== */
.qr-container {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 20px;
    margin-top: 20px;
}
.qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* ========== PROGRES BAR ========== */
.progress {
    height: 35px;
    border-radius: 20px;
    background: #e9ecef;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    font-size: 14px;
    font-weight: bold;
    line-height: 35px;
    transition: width 0.5s ease;
}

/* ========== REZULTATI I STATISTIKA ========== */
.result-item {
    padding: 15px;
    margin: 12px 0;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #28a745;
}
.vote-count {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    display: inline-block;
    margin-left: 10px;
}

/* ========== STATUS BADGE (mobilni) ========== */
.status-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ========== RESPONZIVNOST (MOBILNI TELEFONI) ========== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .card, .welcome-card, .login-card, .voting-card {
        padding: 20px;
        margin: 10px 0;
    }
    .navbar-brand {
        font-size: 1.4rem;
    }
    .btn {
        padding: 8px 18px;
        font-size: 14px;
        width: 100%;
        margin-bottom: 8px;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn-group .btn {
        width: 100%;
        border-radius: 50px !important;
        margin-bottom: 8px;
    }
    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    .tab-content {
        padding: 15px;
    }
    .form-control {
        padding: 10px 12px;
    }
    .status-badge {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 5px 12px;
    }
    .vote-count {
        font-size: 1.5rem;
    }
    .progress {
        height: 25px;
    }
    .progress-bar {
        line-height: 25px;
        font-size: 12px;
    }
    .row {
        flex-direction: column;
    }
    .col-md-6, .col-md-8, .col-md-4 {
        width: 100%;
        margin-bottom: 20px;
    }
    h1, h2, h3, h4 {
        font-size: 1.4rem;
    }
    .qr-container img {
        max-width: 180px;
    }
    /* Smanjenje margina za telefone */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    .mt-4 {
        margin-top: 1rem !important;
    }
}

/* ========== TABELE (za prethodne sesije) ========== */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    font-size: 14px;
}
.table th, .table td {
    padding: 12px;
    vertical-align: middle;
}
@media (max-width: 576px) {
    .table th, .table td {
        padding: 8px;
        font-size: 12px;
    }
}

/* ========== PAGINACIJA ========== */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}
.page-link {
    border-radius: 30px !important;
    margin: 0 3px;
    color: #667eea;
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
}

/* ========== SPINNER ========== */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== POMOĆNE KLASE ========== */
.text-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.shadow-sm {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}