﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --correct-color: #4CAF50;
    --incorrect-color: #F44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-top: 70px;
    overflow-x: hidden;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.quiz-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.quiz-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.quiz-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.nav-btn {
    background: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
    margin: 0 15px 0 15px;
}

    .nav-btn:hover:not(:disabled) {
        background: var(--secondary-color);
        transform: scale(1.1);
    }

    .nav-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

.status-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.status-item {
    text-align: center;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    min-width: 150px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

    .status-item span {
        display: block;
        font-size: 1.3rem;
        color: var(--primary-color);
        margin-top: 8px;
        font-weight: 700;
    }

.question-container {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--dark-color);
    line-height: 1.5;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 6px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.options-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.option-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    min-height: 100px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

    .option:hover:not(.disabled) {
        background-color: #f1f3f5;
        transform: translateY(-3px);
    }

    .option.selected {
        background-color: #e3f2fd;
        border-color: var(--primary-color);
        color: var(--primary-color);
        box-shadow: 0 8px 15px rgba(67, 97, 238, 0.2);
    }

        .option.selected::before {
            content: "✓";
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 1.5rem;
            font-weight: bold;
        }

    .option.disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.question-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1px;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.q-nav-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: white;
    border: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

    .q-nav-btn:hover:not(.disabled) {
        background-color: #e9ecef;
    }

    .q-nav-btn.current {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: scale(1.1);
        box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
    }

    .q-nav-btn.answered {
        background-color: #4cc9f0;
        color: white;
        border-color: #4cc9f0;
    }

    .q-nav-btn.active-nav {
        border: 3px solid var(--danger-color);
        box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.3);
    }

    .q-nav-btn.disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.submit-btn {
    display: block;
    width: 100%;
    max-width: 350px;
    margin: 25px auto 20px;
    padding: 18px;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border: none;
    box-shadow: 0 8px 20px rgba(25, 135, 84, 0.4);
    transition: all 0.3s ease;
    color: white;
}

    .submit-btn:hover:not(:disabled) {
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(25, 135, 84, 0.5);
    }

    .submit-btn:disabled {
        opacity: 0.6;
        transform: none;
        box-shadow: none;
        background: #6c757d;
    }

.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

    .results-modal.active {
        opacity: 1;
        pointer-events: all;
    }

.results-content {
    background: white;
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    position: relative;
    overflow: hidden;
    transform: scale(0.8);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

.progress {
    height: 15px;
    margin: 30px 0;
    border-radius: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 35px 0;
}

.stat-box {
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.answered-box {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
}

.unanswered-box {
    background: linear-gradient(135deg, #9d4edd 0%, #5a189a 100%);
}

.correct-box {
    background: linear-gradient(135deg, #2ec4b6 0%, #1a936f 100%);
}

.wrong-box {
    background: linear-gradient(135deg, #ff9e00 0%, #ff5400 100%);
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.quiz-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quiz-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9e00 0%, #ff5400 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-left: 12px;
}

.start-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    color: white;
    border: none;
    padding: 15px 45px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.4);
    transition: all 0.3s ease;
    margin-top: 20px;
}

    .start-btn:hover:not(:disabled) {
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(13, 110, 253, 0.5);
    }

    .start-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.quiz-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Answers Review Modal */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow-y: auto;
    padding: 20px;
}

    .review-modal.active {
        opacity: 1;
        pointer-events: all;
    }

.review-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 900px;
    width: 95%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.review-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

    .review-header h2 {
        font-size: 2.2rem;
        color: var(--primary-color);
        margin-bottom: 10px;
    }

    .review-header p {
        font-size: 1.2rem;
        color: #666;
    }

.review-item {
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 15px;
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

    .review-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    }

.review-question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.5;
}

.review-answer {
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

    .review-answer.correct {
        background-color: rgba(76, 175, 80, 0.1);
        border: 1px solid var(--correct-color);
    }

    .review-answer.incorrect {
        background-color: rgba(244, 67, 54, 0.1);
        border: 1px solid var(--incorrect-color);
    }

    .review-answer.unanswered {
        background-color: rgba(158, 158, 158, 0.1);
        border: 1px solid #9e9e9e;
    }

.answer-status {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.correct .answer-status {
    background-color: var(--correct-color);
}

.incorrect .answer-status {
    background-color: var(--incorrect-color);
}

.unanswered .answer-status {
    background-color: #9e9e9e;
}

.review-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.review-btn {
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

    .review-btn i {
        margin-right: 8px;
    }

.btn-review {
    background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

    .btn-review:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(67, 97, 238, 0.5);
    }

.btn-close-review {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

    .btn-close-review:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(108, 117, 125, 0.5);
    }

.close-review {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .close-review:hover {
        color: #333;
        transform: scale(1.1);
    }

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .quiz-container {
        min-height: calc(100vh - 80px);
        margin: 10px;
    }

    .quiz-header {
        padding: 15px;
    }

    .quiz-title {
        font-size: 2rem;
    }

    .question-container {
        padding: 15px;
    }

    .question-text {
        font-size: 1.3rem;
        padding: 20px;
    }

    .option-row {
        flex-direction: column;
        gap: 15px;
    }

    .option {
        padding: 20px;
        font-size: 1.1rem;
        min-height: auto;
    }

    .q-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .start-btn, .submit-btn {
        font-size: 1.2rem;
        padding: 14px 30px;
    }

    .quiz-status-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .status-items {
        flex-direction: column;
        gap: 12px;
    }

    .status-item {
        width: 100%;
        min-width: auto;
    }

    .nav-btn {
        align-self: center;
    }

    .results-content {
        padding: 30px 20px;
    }

    .review-content {
        padding: 30px 20px;
    }

    .review-header h2 {
        font-size: 1.8rem;
    }

    .review-item {
        padding: 20px 15px;
    }

    .review-question {
        font-size: 1.1rem;
    }

    .review-controls {
        flex-direction: column;
        gap: 10px;
    }

    .review-btn {
        width: 100%;
        padding: 12px;
    }
}

.disabled-div {
    pointer-events: none;
    opacity: 0;
}