body {
    font-family: 'Roboto', sans-serif;
    padding: 20px;
    background-color: #fafafa;
  }
  /* Giao diện form đăng nhập */
  .login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border: none;
    border-radius: 16px;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  }
  .login-container h2 {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .login-container input {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .login-container input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
    outline: none;
  }
  .login-container button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  .login-container button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
  }
  .login-container button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  /* Spinner / loading effect */
  .loading {
    text-align: center;
    font-size: 18px;
    color: #007BFF;
    margin-top: 20px;
  }
  /* Đồng hồ đếm ngược */
  .timer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    text-align: center;
    z-index: 1000;
  }
  .timer {
    font-size: 20px;
    font-weight: bold;
    color: #D32F2F;
    text-align: center;
    margin-bottom: 0;
  }
  /* Giao diện đề thi */
  .question {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    margin-top: 60px;
  }
  .question p {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
    text-align: center;
  }
  .question-statement {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px dashed #999;
    border-radius: 8px;
    background-color: #eef;
    font-size: 16px;
    color: #333;
  }
  .mc-options {
    display: flex;
    gap: 15px;
    justify-content: center;
  }
  .mc-option {
    width: 150px;
    height: 60px;
    border: 2px solid #ccc;
    border-radius: 12px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    user-select: none;
    position: relative;
  }
  .mc-option:hover {
    transform: scale(1.05);
    border-color: #999;
  }
  .mc-option.selected {
    background-color: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76,175,80,0.6);
  }
  .mc-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .tf-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: center;
  }
  .tf-box {
    width: 150px;
    height: 60px;
    border: 2px solid #ccc;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    user-select: none;
    position: relative;
    transition: background-color 0.3s ease;
  }
  .tf-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
  }
  .tf-btn:hover {
    transform: scale(1.05);
  }
  .tf-btn input {
    display: none;
  }
  .tf-btn.selected.T {
    background-color: #2196F3;
    color: white;
  }
  .tf-btn.selected.F {
    background-color: #F44336;
    color: white;
  }
  .numeric-option {
    width: 150px;
    height: 60px;
    border: 2px solid #ccc;
    border-radius: 12px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #555;
    transition: transform 0.3s ease, border-color 0.3s ease;
    user-select: none;
    margin: 0 auto;
    position: relative;
  }
  .numeric-option input {
    width: 90%;
    height: 80%;
    text-align: center;
    font-size: 20px;
    border: none;
    background: transparent;
    outline: none;
  }
  .numeric-option:hover {
    transform: scale(1.05);
    border-color: #999;
  }
  .correct-answer {
    border-color: magenta !important;
    box-shadow: 0 0 10px magenta;
  }
  .numeric-option.correct {
    border-color: magenta;
    box-shadow: 0 0 10px magenta;
  }
  .tf-btn.correct-answer {
    border: 3px solid magenta;
    box-shadow: 0 0 10px magenta;
    transform: scale(1.1);
  }
  .correct-answer-display {
    font-size: 14px;
    font-weight: bold;
    color: magenta;
  }
  .tf-grade {
    margin-top: 5px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
  }
  /* Explanation styles */
  .explanation {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background-color: #f9f9f9;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
  }
  .explanation:hover {
    background-color: #f0f0f0;
  }
  .explanation h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .explanation p {
    margin-bottom: 15px;
  }
  .explanation ul, .explanation ol {
    padding-left: 30px;
    margin-bottom: 15px;
  }
  .explanation li {
    margin-bottom: 8px;
  }
  .explanation a {
    color: #007BFF;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  .explanation a:hover {
    color: #0056b3;
  }
  .explanation code {
    background-color: #eee;
    padding: 3px 5px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
  }
  .toggle-explanation {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .toggle-explanation:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
  }
  .explanation.hidden {
    display: none;
  }
  .question-statement img,
  .explanation img {
    width: 100%;
    height: auto;
    display: block;
  }
  /* Nút Chấm điểm & Nộp bài */
  #gradeBtn {
    display: block;
    margin: 20px auto;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  #gradeBtn:hover {
    background-color: #218838;
    transform: translateY(-2px);
  }
  #gradeBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  #gradeBtn i {
    margin-right: 8px;
  }
  /* Bảng điểm đã được nâng cấp */
  #result-container {
    max-width: 600px;
    margin: 20px auto;
    background: linear-gradient(135deg, #f0f9ff, #e0f7fa);
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    padding: 30px;
    text-align: center;
  }
  #result-container h2 {
    color: #00796b;
    margin-bottom: 20px;
    font-size: 26px;
  }
  #result-container p {
    font-size: 18px;
    color: #004d40;
    margin: 8px 0;
  }
  #result-container .score {
    font-size: 32px;
    font-weight: bold;
    color: #00796b;
    margin-top: 10px;
  }
  #result-container button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  #result-container button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
  }
  /* Style cho container đăng nhập */
#loginScreen.login-container {
width: 100%;
max-width: 450px;
margin: 50px auto;
padding: 40px 30px;
background: #fff;
border-radius: 20px;
box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
text-align: center;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#loginScreen.login-container:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Style cho tiêu đề */
#loginScreen.login-container h2 {
font-size: 30px;
color: #333;
margin-bottom: 30px;
letter-spacing: 1.2px;
text-transform: uppercase;
}

/* Style cho các input và select */
#loginScreen.login-container input,
#loginScreen.login-container select {
width: 100%;
padding: 14px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 10px;
font-size: 16px;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#loginScreen.login-container input:focus,
#loginScreen.login-container select:focus {
border-color: #5c6bc0;
box-shadow: 0 0 10px rgba(92, 107, 192, 0.3);
outline: none;
}

/* Style cho label */
#loginScreen.login-container label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #555;
text-align: left;
}

/* Style cho nút Start */
#loginScreen.login-container button {
width: 100%;
padding: 15px;
font-size: 18px;
font-weight: bold;
color: #fff;
background: linear-gradient(45deg, #5c6bc0, #3949ab);
border: none;
border-radius: 10px;
cursor: pointer;
transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

#loginScreen.login-container button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#loginScreen.login-container button:active {
transform: translateY(0);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}
