/* 오늘의 퀴즈 전용 스타일 */
.daily-quiz-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.quiz-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-date {
  font-weight: bold;
  color: var(--primary-color, #2563eb);
}

.difficulty-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.diff-easy { background-color: #dcfce7; color: #166534; }
.diff-medium { background-color: #fef3c7; color: #92400e; }
.diff-hard { background-color: #fee2e2; color: #991b1b; }

.quiz-instruction {
  margin-bottom: 16px;
  font-weight: 500;
}

/* 1~9 선택 셀렉터 스타일 */
.tile-selector-wrapper {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-sub, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.selector-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color, #334155);
}

.tile-btn-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .tile-btn-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.btn-tile-select {
  padding: 10px 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #334155;
}

.btn-tile-select:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.btn-tile-select.selected {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.selected-summary {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: #475569;
}

.selected-tiles-text {
  font-weight: bold;
  color: #2563eb;
}

.submit-action-bar {
  text-align: center;
}

.btn-submit-answer {
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-submit-answer:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.btn-submit-answer:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* 제출 결과창 */
.submission-result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.5;
}

.submission-result-box.correct {
  background-color: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.submission-result-box.wrong {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.quiz-answer-box {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-color, #cbd5e1);
}

.btn-toggle-answer {
  background-color: #475569;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-toggle-answer:hover {
  background-color: #334155;
}

.answer-content {
  display: none;
  margin-top: 16px;
  background: var(--bg-sub, #f8fafc);
  padding: 16px;
  border-radius: 8px;
}

.answer-title {
  margin-bottom: 8px;
}

.answer-title span {
  color: #2563eb;
}

.answer-explanation-text {
  font-size: 0.95rem;
  color: #475569;
}

/* 게시판 스타일 */
.board-section {
  margin-top: 40px;
}

.board-description {
  margin-bottom: 16px;
  color: #64748b;
  font-size: 0.9rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg, #ffffff);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-input {
  padding: 8px 12px;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-input.nickname { flex: 1; min-width: 200px; }
.form-input.captcha { width: 200px; }

textarea.form-input {
  width: 100%;
  height: 80px;
  resize: vertical;
}

.btn-submit {
  align-self: flex-end;
  background-color: #10b981;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: #059669;
}

.btn-submit:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  padding: 14px 18px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: #64748b;
}

/* 기본 (라이트 모드) 닉네임 색상 */
.comment-author {
  font-weight: 600;
  color: #2563eb; /* 라이트 모드에서 명확히 보이는 블루 */
}

/* 다크 모드 닉네임 색상 */
body.dark-mode .comment-author,
[data-theme="dark"] .comment-author {
  color: #60a5fa; /* 다크 모드 배경에서 시독성이 뛰어난 밝은 블루 */
}

.comment-text {
  line-height: 1.5;
  word-break: break-word;
}

.no-comments {
  color: #94a3b8;
  text-align: center;
  padding: 20px;
}


/* 댓글 테이블 디자인 */
.comment-list-wrapper {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.comment-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.comment-table th,
.comment-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.comment-table th {
  background-color: var(--table-header-bg, #f8fafc);
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

/* 닉네임 색상 (라이트/다크 대응) */
.comment-author-td {
  font-weight: 600;
  color: #2563eb;
  word-break: break-all;
}

body.dark-mode .comment-author-td,
[data-theme="dark"] .comment-author-td {
  color: #60a5fa;
}

.comment-text-td {
  word-break: break-all;
}

.no-comments {
  text-align: center;
  color: #94a3b8;
  padding: 1rem !important;
}

/* 게시판 보러가기 버튼 */
.board-more-action {
  margin-top: 1.5rem;
  text-align: right;
}

.btn-go-board {
  display: inline-block;
  padding: 8px 16px;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-go-board:hover {
  background-color: #1d4ed8;
}

/* 닉네임 및 보안확인 입력칸 50% 50% 균등 배치 */
.comment-form .form-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.comment-form .form-row .form-input.nickname,
.comment-form .form-row .form-input.captcha {
  flex: 1 1 50%;
  width: 50%;
  box-sizing: border-box;
}