body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background-color: #e0f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 5px solid #ffca28;
}

h1 { color: #ff7043; font-size: 24px; }
p { color: #5c6bc0; font-size: 18px; margin-bottom: 25px; }

.input-group input {
    width: 90%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #b3e5fc;
    border-radius: 10px;
    font-size: 18px;
    outline: none;
}

.input-group input:focus { border-color: #29b6f6; }

.button-group button {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

#btnLogin { background-color: #66bb6a; color: white; }
#btnRegister { background-color: #ffa726; color: white; }

.button-group button:hover { transform: scale(1.05); }

.message {
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
}
.success { color: #43a047; }
.error { color: #e53935; }

/* CSS cho Bảng thông báo ở giữa màn hình */
.modal {
    display: none; /* Mặc định ẩn */
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); /* Nền đen mờ */
    justify-content: center; 
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    border: 5px solid #29b6f6;
    max-width: 320px;
    width: 85%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: popUp 0.3s ease-out;
}

@keyframes popUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h2 { margin-top: 0; color: #ff7043; font-size: 22px; }
.modal-content p { font-size: 18px; color: #333; margin-bottom: 20px; }

.modal-content button {
    background-color: #29b6f6;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.modal-content button:hover { background-color: #0288d1; }

/* Giao diện trang làm bài Quiz */
.header-bar {
    position: absolute;
    top: 20px;
    width: 90%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    color: #3f51b5;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.quiz-container {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 90%;
    border: 5px solid #4db6ac;
    text-align: center;
    margin-top: 60px;
}

.question-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #009688;
}

.question-card h2 {
    font-size: 22px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media(min-width: 480px) {
    .options-grid { grid-template-columns: 1fr 1fr; }
}

.option-btn {
    background-color: #ffffff;
    border: 2px solid #b2dfdb;
    padding: 18px 10px;
    font-size: 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    color: #004d40;
    transition: all 0.2s;
}

.option-btn:hover {
    background-color: #e0f2f1;
    border-color: #009688;
    transform: translateY(-2px);
}

.loading {
    font-size: 18px;
    color: #00796b;
    font-weight: bold;
    padding: 20px;
}

/* Định dạng riêng cho Bảng thông báo kết quả ở giữa */
.quiz-modal {
    max-width: 500px !important; /* Rộng hơn chút để dễ đọc lời giải */
    border: 6px solid #ffb300;
}

.explanation-box {
    background-color: #fff9c4;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.6;
    border-left: 5px solid #fbc02d;
    max-height: 200px;
    overflow-y: auto;
}

.explanation-box strong { color: #f57f17; display: block; margin-bottom: 5px;}