/* ===== 기본 테이블 스타일 ===== */
.quiz-list table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.quiz-list th, .quiz-list td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}
.quiz-list th {
  background: #f8f9fa;
  font-weight: bold;
}

/* ===== 버튼 스타일 ===== */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-exam {
  display: inline-block;
  padding: 10px 18px;
  background-color: #007bff;   /* 파란색 배경 */
  color: #fff;                 /* 글자색 흰색 */
  border-radius: 6px;          /* 모서리 둥글게 */
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;       /* 밑줄 제거 */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-exam:hover {
  background-color: #FFFF0F;
  transform: translateY(-2px); /* 살짝 위로 올라가는 효과 */
}

.btn-submit {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.btn-submit:hover {
  background: #218838;
}

/* ===== 문제 블록 ===== */
.question-block {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}
.question-block p {
  margin: 0 0 10px;
  font-weight: bold;
}
.question-desc {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* 은은한 그림자 */
  font-size: 14px;
  line-height: 1.5;
}

.quiz-option {
  display: flex;
  align-items: center;
  margin: 4px 0;
}
.quiz-radio {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  transform: scale(0.8); /* 크기 줄이기 */
}

/* 주관식 입력창 스타일 */
.quiz-input-text {
    width: 100%;
    max-width: 450px;
    padding: 10px 14px;
    margin-top: 10px;
    border: 2px solid #eee;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box; /* 패딩이 너비에 영향을 주지 않도록 */
}

.quiz-input-text:focus {
    border-color: #007bff;
    background-color: #f0f7ff;
    outline: none;
    box-shadow: 0 0 8px rgba(0,123,255,0.15);
}

/* 주관식 정답 안내 문구 (선택 사항) */
.answer-zone span {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}


/* ===== 반응형 처리 ===== */

/* 태블릿 이하 */
@media (max-width: 768px) {
  .quiz-list table, 
  .quiz-list thead, 
  .quiz-list tbody, 
  .quiz-list th, 
  .quiz-list td, 
  .quiz-list tr {
    display: block;
    width: 100%;
  }

  .quiz-list tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
  }

  .quiz-list th {
    display: none; /* 헤더 숨김 */
  }

  .quiz-list td {
    text-align: left;
    border: none;
    padding: 6px 0;
  }

  .quiz-list td::before {
    content: attr(data-label); /* 각 셀 앞에 라벨 표시 */
    font-weight: bold;
    margin-right: 8px;
    color: #555;
  }

  .btn {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}
/* 지문 문항 스타일 */
.quiz-item.type-3 {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 30px;
}

/* 지문 라벨 스타일 */
.quiz-statement-label {
    display: inline-block;
    background: #666;
    color: #fff;
    padding: 2px 8px;
    font-size: 0.85em;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}

/* 일반 문제 번호 스타일 */
.quiz-num {
    font-weight: bold;
    color: #007bff;
    margin-right: 5px;
}
/* 모바일 이하 */
@media (max-width: 480px) {
  .question-block {
    padding: 10px;
    font-size: 14px;
  }
  .quiz-option {
    font-size: 13px;
  }
  .btn, .btn-submit {
    font-size: 13px;
    padding: 8px 12px;
    width: 100%;
  }
}


/* 결과 박스 기본 스타일 */
.result-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.result-box h2 {
  margin-top: 0;
  font-size: 20px;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
  text-align: center;
}

.result-box p {
  font-size: 15px;
  margin: 8px 0;
  color: #444;
  text-align: center;
}

.result-box p span {
  font-weight: bold;
  color: #007bff; /* 강조 색상 */
}

/* ===== 반응형 처리 ===== */

/* 태블릿 이하 */
@media (max-width: 768px) {
  .result-box {
    padding: 16px;
    font-size: 14px;
    width: 90%;
  }
  .result-box h2 {
    font-size: 18px;
  }
  .result-box p {
    font-size: 14px;
  }
}

/* 모바일 이하 */
@media (max-width: 480px) {
  .result-box {
    padding: 12px;
    font-size: 13px;
    width: 95%;
  }
  .result-box h2 {
    font-size: 16px;
  }
  .result-box p {
    font-size: 13px;
  }
}


/* 응시함 버턴 */
.quiz-list .btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #4CAF50, #45A049);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.quiz-list .btn:hover {
  background: linear-gradient(135deg, #45A049, #3e8e41);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.quiz-list .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/*비밀번호 입력 */
.quiz-pass-form {
  max-width: 400px;
  margin: 40px auto;
  padding: 25px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', sans-serif;
}

.quiz-pass-form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: bold;
  color: #333;
  text-align: left;
}

.quiz-pass-form input[type="text"],
.quiz-pass-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.quiz-pass-form input[type="text"]:focus,
.quiz-pass-form input[type="password"]:focus {
  border-color: #007bff;
  outline: none;
}

.quiz-pass-form input[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #007bff;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.quiz-pass-form input[type="submit"]:hover {
  background: #0056b3;
}

/* 오류 메시지 */
.error-msg {
  margin-top: 10px;
  color: #d9534f;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

