* {
    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;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.question-section {
    margin-bottom: 30px;
}

#question-text {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

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

.option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.option:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-2px);
}

.option.selected {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
}

.option.correct {
    background: #4caf50;
    color: white;
    border-color: #388e3c;
}

.option.incorrect {
    background: #f44336;
    color: white;
    border-color: #d32f2f;
}

.feedback-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4caf50;
    animation: slideIn 0.3s ease-out;
}

.feedback-message[style*="color: #f44336"] {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
}

.tip-message {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    font-size: 1rem;
    color: #1976d2;
    animation: slideIn 0.3s ease-out;
    text-align: left;
}

.tip-message strong {
    font-weight: 600;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detailed-explanations {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #2196f3;
    animation: slideIn 0.4s ease-out;
}

.explanation-item {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.explanation-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.explanation-item:last-child {
    margin-bottom: 0;
}

.explanation-item strong {
    font-weight: 600;
    margin-right: 5px;
}

.explanation-item span {
    font-weight: 500;
}

.explanation-item div {
    margin-top: 8px;
    padding-left: 20px;
    border-left: 2px solid #e9ecef;
}

/* Styling cho giải thích đúng/sai sẽ được áp dụng bằng JavaScript */

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.progress {
    position: relative;
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.result-section {
    text-align: center;
}

.result-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
}

.score {
    font-size: 3rem;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 10px;
}

.percentage {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 30px;
}

/* Menu chọn chương */
.chapter-selection {
    text-align: center;
    margin: 30px 0;
}

.chapter-selection h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.chapter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.chapter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chapter-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chapter-btn h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.chapter-btn p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Nút kết quả */
.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .chapter-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chapter-btn {
        padding: 20px;
    }
    
    .chapter-btn h3 {
        font-size: 1.1rem;
    }
    
    .result-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* CSS để đẩy phần web hosting xuống dưới cùng */
a[href*="somee.com"], 
a[href*="somee"], 
div[style*="somee"],
*[style*="somee.com"] {
    position: fixed !important;
    bottom: 10px !important;
    right: 10px !important;
    z-index: 1000 !important;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 5px 10px !important;
    border-radius: 5px !important;
    backdrop-filter: blur(5px) !important;
}

/* Ẩn hoàn toàn nếu cần */
.hide-hosting {
    display: none !important;
}
