/* ═══════════════════════════════════════════
   Test Shared Styles — Tatina školica
   ═══════════════════════════════════════════ */

.test-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.test-header {
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.test-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,.3);
}

.test-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 1.1rem;
}

.info-item {
    background: rgba(255,255,255,.2);
    padding: 10px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Timer */
.timer-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
}

.timer.warning {
    color: #ffc107;
    animation: pulse 1s ease-in-out infinite;
}

.timer.danger {
    color: #dc3545;
    animation: pulse .5s ease-in-out infinite;
}

/* Questions */
.question-container {
    background: white;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    transition: all .3s ease;
}

.question-container:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.question-number {
    background: linear-gradient(135deg,#28a745 0%,#20c997 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.3rem;
    color: #495057;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all .3s ease;
    border: 2px solid transparent;
}

.option:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.3);
}

.option.selected {
    background: linear-gradient(135deg,#d4edda 0%,#c3e6cb 100%);
    border-color: #28a745;
}

/* Submit */
.submit-container {
    text-align: center;
    margin: 40px 0;
}

.submit-btn {
    background: linear-gradient(135deg,#28a745 0%,#20c997 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 5px 15px rgba(40,167,69,.3);
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(40,167,69,.4);
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results */
.results-container {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
    display: none;
}

.results-container.show {
    display: block;
    animation: fadeInScale .8s ease-out;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,.3);
}

.grade-5 { background: linear-gradient(135deg,#28a745 0%,#20c997 100%); }
.grade-4 { background: linear-gradient(135deg,#17a2b8 0%,#20c997 100%); }
.grade-3 { background: linear-gradient(135deg,#ffc107 0%,#ffca2c 100%); }
.grade-2 { background: linear-gradient(135deg,#fd7e14 0%,#ff8800 100%); }
.grade-1 { background: linear-gradient(135deg,#dc3545 0%,#e55353 100%); }

.results-text {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 30px;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.action-btn {
    background: linear-gradient(135deg,#6a11cb 0%,#2575fc 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    transform: scale(1.05);
}

.diploma-btn {
    background: linear-gradient(135deg,#ffd700 0%,#ffed4e 100%);
    color: #495057;
}

.progress-bar-container {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg,#28a745 0%,#20c997 100%);
    width: 0%;
    transition: width 2s ease-in-out;
}

/* Correctness markers */
.question-container.correct {
    border-left: 5px solid #28a745;
    background: linear-gradient(135deg,#d4edda 0%,rgba(212,237,218,.3) 100%);
}

.question-container.incorrect {
    border-left: 5px solid #dc3545;
    background: linear-gradient(135deg,#f8d7da 0%,rgba(248,215,218,.3) 100%);
}

.correct-answer {
    color: #155724;
    font-weight: bold;
    margin-top: 10px;
    padding: 10px;
    background: #d4edda;
    border-radius: 8px;
}

/* Navigation */
.test-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg,#6a11cb 0%,#2575fc 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(106,17,203,.3);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .5; }
}

/* Responsive */
@media (max-width: 768px) {
    .test-title { font-size: 2rem; }
    .test-info { gap: 15px; }
    .results-actions { flex-direction: column; align-items: center; }
    .test-navigation { flex-direction: column; }
    .nav-btn { width: 100%; justify-content: center; }
}
