* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
}

.quiz-container {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.header {
    background: #C80000;
    padding: 30px 20px;
    text-align: center;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.quiz-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.quiz-content {
    padding: 30px;
    background: #fff;
}

.question-container {
    margin-bottom: 30px;
}

.question {
    font-size: 18px;
    font-weight: 600;
    color: #535353;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: center;
    white-space: pre-line;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.option {
    background: #fff;
    border: 2px solid #e9ecef;
    padding: 18px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: left;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    white-space: pre-line;
}

.option:hover {
    background: #f8f9fa;
    border-color: #C80000;
}

.option.selected {
    border-color: #C80000;
    background: #fff5f5;
}

.option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option.correct::before {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #28a745;
    font-weight: bold;
}

.option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.option.incorrect::before {
    content: '✗';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #dc3545;
    font-weight: bold;
}

.option.disabled {
    pointer-events: none;
    opacity: 0.8;
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1.02);
    }
}

@keyframes incorrectShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.next-btn {
    background: linear-gradient(135deg, #535353 0%, #3a3a3a 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 25px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(83, 83, 83, 0.3);
    position: relative;
    overflow: hidden;
}

.next-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.4s;
    transform: translate(-50%, -50%);
}

.next-btn:hover::before {
    width: 300px;
    height: 300px;
}

.next-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.next-btn.enabled {
    background: linear-gradient(135deg, #C80000 0%, #a60000 100%);
    box-shadow: 0 6px 25px rgba(200, 0, 0, 0.4);
    transform: translateY(-2px);
}

.next-btn.enabled:hover {
    background: linear-gradient(135deg, #a60000 0%, #8b0000 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(200, 0, 0, 0.5);
}

.explanation {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: none;
    border-left: 5px solid #28a745;
    padding: 20px 25px;
    margin-top: 25px;
    border-radius: 15px;
    font-size: 15px;
    color: #2c3e50;
    display: none;
    animation: slideDown 0.5s ease;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.1);
    position: relative;
    white-space: pre-line;
}

.explanation::before {
    content: '💡 Giải thích: ';
    font-weight: bold;
    color: #28a745;
    display: block;
    margin-bottom: 10px;
}

.explanation.show {
    display: block;
}

.results {
    text-align: center;
    padding: 40px 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    margin: 20px;
}

.score {
    font-size: 36px;
    font-weight: bold;
    color: #C80000;
    margin-bottom: 20px;
}

.score-text {
    font-size: 18px;
    color: #535353;
    margin-bottom: 30px;
}

.comment {
    font-size: 16px;
    color: #535353;
    margin-bottom: 30px;
    line-height: 1.5;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.restart-btn {
    background: #C80000;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: #a60000;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-text {
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #535353;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 50px;
    height: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #C80000, #ff4444);
    height: 100%;
    border-radius: 50px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(200, 0, 0, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@media (max-width: 768px) {
    .header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .quiz-content {
        padding: 0 15px;
    }

    .quiz-title {
        font-size: 20px;
    }

    .question {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .option {
        padding: 12px 15px;
        font-size: 14px;
    }

    .next-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .explanation {
        padding: 12px 15px;
        font-size: 13px;
    }

    .score {
        font-size: 28px;
    }
}