@charset "UTF-8";

/* ==========================================================================
   1. 하단 고정 상태 바 (타이머 및 진행률 표시)
   ========================================================================== */
.sticky-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  top: auto;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-sizing: border-box;
  font-family: 'IBM Plex Sans KR', sans-serif;
}

.status-timer {
  font-size: 1.15rem;
  font-weight: bold;
  color: #d9534f;
  white-space: nowrap;
}

.status-timer.practice {
  color: #28a745;
}
.status-timer.review {
  color: #dc3545;
}

.status-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 40%;
  justify-content: flex-end;
}

.status-progress-bar {
  width: 70%;
  height: 12px;
  background-color: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.status-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #614e9c, #7476d4);
  transition: width 0.3s ease;
}

.status-progress-text {
  font-size: 0.9rem;
  font-weight: bold;
  color: #333;
  min-width: 45px;
  text-align: right;
}

body {
  padding-bottom: 90px !important;
}

/* ==========================================================================
   2. 문제 박스 및 보기 정오답 시각 피드백 스타일
   ========================================================================== */
.question_box.correct {
  border: 2px solid #28a745 !important;
}
.question_box.wrong {
  border: 2px solid #d9534f !important;
}

/* 객관식 정오답 색상 */
.q_choices label.user-correct,
.q_choices label.actual-correct {
  background-color: #d4edda !important;
  color: #155724 !important;
  border-radius: 6px;
  display: block;
}
.q_choices label.user-wrong {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  border-radius: 6px;
  display: block;
}

/* 💡 주관식 전용 입력창 디자인 및 정오답 스타일 */
.q_subjective_input {
  width: 100%;
  max-width: 400px;
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s;
}
.q_subjective_input:focus {
  border-color: #7476d4;
  box-shadow: 0 0 5px rgba(116, 118, 212, 0.3);
}
.q_subjective_input.correct-text {
  border: 2px solid #28a745 !important;
  background-color: #f4fbf7;
}
.q_subjective_input.wrong-text {
  border: 2px solid #d9534f !important;
  background-color: #fff5f5;
}

/* 💡 틀렸을 때 하단에 정답을 텍스트로 보여주는 영역 */
.correct-answer-display {
  margin-top: 15px;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  font-weight: bold;
  color: #155724;
}

.question_box input:disabled {
  cursor: not-allowed;
}

/* ==========================================================================
   3. 본문 최하단 새로운 버튼 영역 (제출하기 버튼 대체용)
   ========================================================================== */
.review-bottom-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 40px auto;
  width: 100%;
  max-width: 500px;
}

.btn-review-exit,
.btn-review-wrong {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
}

.btn-review-exit {
  background-color: #edf2f7;
  color: #4a5568;
}
.btn-review-exit:hover {
  background-color: #e2e8f0;
}
.btn-review-wrong {
  background-color: #7476d4;
  color: white;
}
.btn-review-wrong:hover {
  background-color: #614e9c;
}

/* ==========================================================================
   4. 팝업창 스타일 (시작 팝업 & 결과 팝업)
   ========================================================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.custom-modal-overlay.show {
  display: flex;
}

.custom-modal {
  background-color: #fff;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 480px;
  width: 85%;
  font-family: 'IBM Plex Sans KR', sans-serif;
  animation: modalFadeIn 0.3s ease;
}

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

.custom-modal h2 {
  margin-top: 0;
  color: #614e9c;
  font-size: 1.6rem;
  margin-bottom: 15px;
}
.custom-modal p {
  font-size: 1rem;
  margin-bottom: 25px;
  line-height: 1.6;
  color: #555;
}

.timer-input-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
}
.timer-input-wrapper input {
  width: 80px;
  padding: 10px;
  font-size: 1.2rem;
  border: 2px solid #614e9c;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
}
.timer-input-wrapper input:focus {
  outline: none;
  border-color: #7476d4;
}
.timer-input-wrapper span {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.custom-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.custom-modal-buttons button,
.custom-modal-buttons a {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
}

.btn-start-timer {
  background-color: #614e9c;
  color: white;
}
.btn-start-timer:hover {
  background-color: #4d3d80;
}
.btn-practice-mode {
  background-color: #28a745;
  color: white;
}
.btn-practice-mode:hover {
  background-color: #218838;
}

.btn-close {
  background-color: #edf2f7;
  color: #4a5568;
}
.btn-close:hover {
  background-color: #e2e8f0;
}
.btn-view-answers {
  background-color: #17a2b8;
  color: white;
}
.btn-view-answers:hover {
  background-color: #138496;
}
.btn-wrong-notes {
  background-color: #7476d4;
  color: white;
}
.btn-wrong-notes:hover {
  background-color: #614e9c;
}
