/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
}

body.exam-mode {
  background: #f3f4f6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  color: #111827;
}

/* =========================
   WRAPPER
========================= */
.exam-wrap {
  max-width: 1400px;
  margin: 16px auto;
  padding: 12px;
}

/* =========================
   HEADER
========================= */
.exam-header {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
}

.exam-title {
  font-size: 20px;
  font-weight: 700;
}

.exam-info {
  font-size: 14px;
  color: #374151;
  display: flex;
  gap: 20px;
}

/* =========================
   MAIN LAYOUT
========================= */
.exam-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

/* =========================
   LEFT – QUESTIONS
========================= */
.exam-left {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.question {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.question:last-child {
  border-bottom: none;
}

.question-title {
  font-weight: 600;
  margin-bottom: 10px;
}

/* ===== ANSWERS ===== */
.answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answers label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}

.answers label:hover {
  background: #f9fafb;
  border-color: #2563eb;
}

.answers input[type="radio"] {
  accent-color: #2563eb;
}

/* =========================
   RIGHT – SIDEBAR
========================= */
.exam-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* INFO BOX */
.exam-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.exam-box h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

/* =========================
   TIMER
========================= */
.exam-timer {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
  text-align: center;
}

/* =========================
   CHỌN ĐỀ
========================= */
.exam-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.exam-list button {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}

.exam-list button:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* =========================
   SUBMIT
========================= */
.exam-submit {
  margin-top: auto;
}

.exam-submit button {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.exam-submit button:hover {
  background: #15803d;
}

/* ================= EXAM LAYOUT ================= */


/* ===== LEFT: LÀM BÀI ===== */
.exam-left{
  flex:2;                /* 2/3 */
  background:#fff;
  border-radius:10px;
  padding:16px;
  overflow-y:auto;       /* ✅ SCROLL Ở ĐÂY */
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

/* ===== RIGHT: CHỌN ĐỀ ===== */
.exam-right{
  flex:1;                /* 1/3 */
  background:#f9fafb;
  border-radius:10px;
  padding:16px;
  overflow:hidden;       /* ❌ không scroll */
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
}

/* thanh cuộn đẹp hơn */
.exam-left::-webkit-scrollbar{
  width:8px;
}
.exam-left::-webkit-scrollbar-thumb{
  background:#cfd8dc;
  border-radius:4px;
}

.btn-back{
  margin-top:12px;
  width:100%;
  padding:10px;
  background:#eceff1;
  border:none;
  border-radius:6px;
  font-weight:bold;
  cursor:pointer;
}

.btn-back:hover{
  background:#cfd8dc;
}

.exam-locked{
  pointer-events:none;
  opacity:0.9;
}

.exam-left{
  max-height: calc(100vh - 140px); /* trừ header */
  overflow-y: auto;
}
.exam-right{
  max-height: calc(100vh - 140px); /* trừ header */
  overflow-y: auto;
}

