/*
Theme Name: FontQuiz Style
*/

/* 기본 설정 */
body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #f9f9f9;
  color: #111;
  margin: 0;
  padding: 0;
}

/* 언어 토글 버튼 */
#lang-toggle-btn {
  float: right;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
}

/* 퀴즈 시작 화면 */
#fontquiz-start {
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  max-width: 500px;
  margin: 2rem auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.start-control {
  margin-bottom: 16px;
}

.start-control label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.start-control input,
.start-control select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

/* 퀴즈 시작 버튼 */
#quiz-start-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #14b8a6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quiz-start-btn:hover {
  background-color: #0f766e;
}

/* 문제 박스 */
.quiz-item {
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-width: 700px;
}

.quiz-item img.quiz-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border-radius: 10px;
}

/* 보기 */
.quiz-item label {
  display: block;
  margin: 0.5rem 0;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.quiz-item label:hover {
  background: #e5f7f8;
}

.choice-image {
  max-width: 100px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

/* 퀴즈 네비게이션 */
.quiz-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 6px;
}

.quiz-nav button {
  background: #ddd;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.quiz-nav button:hover {
  background: #ccc;
}

.quiz-nav button.active {
  background: #14b8a6;
  color: #fff;
  font-weight: bold;
}

.quiz-nav .quiz-complete {
  background: #0f766e;
  color: #fff;
  font-weight: bold;
}

/* 결과 */
.quiz-result {
  padding: 2rem;
  background: #ffffff;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin: 2rem auto;
  max-width: 600px;
  font-size: 1.1rem;
}

/* 결과 강조 */
.comparison-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
  color: #14b8a6;
}

.highlight-score {
  animation: pulse 1s infinite alternate;
  color: #14b8a6;
  font-weight: bold;
}

@keyframes pulse {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.6; transform: scale(1.05); }
}

/* 결과 애니메이션 */
.result-animation {
  margin: 2rem auto 1rem;
  max-width: 400px;
}

/* 결과 버튼 */
button.btn.retry,
#capture-btn {
  display: inline-block;
  background-color: #23b8af;
  color: #fff;
  border: none;
  padding: 12px 24px;
  margin: 10px 10px 0 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

#capture-btn:hover,
.btn.retry:hover {
  background-color: #1aa99e;
}

/* 공유 카드 */
#share-image {
  width: 100%;
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: #ffffff;
  color: #111;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  text-align: center;
}

#share-image h1 {
  font-size: 24px;
  font-weight: 700;
}

#share-image h2 {
  font-size: 32px;
  font-weight: 800;
  color: #14b8a6;
}

.rank-badge {
  display: inline-block;
  background: #14b8a6;
  color: #fff;
  padding: 6px 14px;
  border-radius: 16px;
  font-weight: bold;
  margin: 0.6em auto;
}

footer {
  margin-top: 1em;
  font-size: 13px;
  color: #888;
}

/* 통계 donut */
.donut-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  color: #333;
}

/* 반응형 */
@media screen and (max-width: 600px) {
  .quiz-item,
  .quiz-result,
  #fontquiz-start,
  #share-image {
    padding: 1rem;
    width: 90%;
  }

  button.btn.retry,
  #capture-btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .cta-buttons a {
    width: 100%;
  }
}

/* 다크 모드 */
body.dark-mode {
  background: #1c1c1c;
  color: #f0f0f0;
}

body.dark-mode .quiz-item,
body.dark-mode #fontquiz-start,
body.dark-mode .quiz-result,
body.dark-mode #share-image {
  background: #2a2a2a;
  color: #f0f0f0;
}

body.dark-mode label {
  background: #333;
  border-color: #555;
  color: #eee;
}

body.dark-mode .rank-badge {
  background: #0f766e;
}

body.dark-mode footer {
  color: #aaa;
}

/* 관리자 페이지 테이블 */
table.widefat {
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  overflow: hidden;
}

table.widefat thead {
  background: #f0f4f8;
  color: #333;
}

table.widefat th,
table.widefat td {
  padding: 12px;
  text-align: left;
}

.edit-row {
  background: #fcfcfc;
  border-top: 1px solid #eee;
}

.edit-row input,
.edit-row select {
  margin: 4px 6px 4px 0;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.edit-row button {
  margin-top: 4px;
}

.button.button-danger {
  background-color: #e11d48;
  color: #fff;
}

.button.button-danger:hover {
  background-color: #be123c;
}