/* 퀴즈 풀이 전용 아레나 스타일 - 사이트 기본 테마와 분리된 독립 네임스페이스 */
.qz-arena {
  --qz-bg: #f9f9f7;
  --qz-card: #ffffff;
  --qz-card-2: #f1f1ee;
  --qz-border: rgba(11, 11, 11, .10);
  --qz-mint: #12b981;
  --qz-mint-2: #0e9c6e;
  --qz-red: #e0433f;
  --qz-ink: #14140f;
  --qz-ink-2: #52514e;
  --qz-muted: #898781;
  background: var(--qz-bg);
  color: var(--qz-ink);
  min-height: 100vh;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
  padding-bottom: 96px;
  position: relative;
  overflow-x: clip;
}
.qz-arena a { color: inherit; text-decoration: none; }

/* header */
.qz-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; max-width: 760px; margin: 0 auto; gap: 16px; flex-wrap: wrap;
}
.qz-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.qz-brand-icon { font-size: 19px; }
.qz-header-right { display: flex; align-items: center; gap: 14px; }
.qz-level-badge {
  display: flex; align-items: center; gap: 8px; background: rgba(18, 185, 129, .12);
  border: 1px solid rgba(18, 185, 129, .3); border-radius: 999px; padding: 5px 14px 5px 6px;
}
.qz-level-icon {
  width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--qz-mint), var(--qz-mint-2));
  display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.qz-level-text { display: flex; flex-direction: column; line-height: 1.15; }
.qz-level-text strong { font-size: 13px; font-weight: 800; }
.qz-level-text span { font-size: 10px; color: var(--qz-ink-2); font-weight: 600; }
.qz-xp { font-size: 13px; font-weight: 700; color: var(--qz-ink-2); white-space: nowrap; }
.qz-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--qz-card-2);
  border: 2px solid rgba(18, 185, 129, .35); display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* progress */
.qz-progress-wrap { max-width: 760px; margin: 0 auto; padding: 0 28px 26px; }
.qz-progress-label { font-size: 13px; font-weight: 700; color: var(--qz-ink-2); margin: 0 0 10px; }
.qz-progress-track { display: flex; gap: 6px; }
.qz-progress-seg { flex: 1; height: 6px; border-radius: 999px; background: rgba(11, 11, 11, .08); }
.qz-progress-seg.filled {
  background: linear-gradient(90deg, var(--qz-mint-2), var(--qz-mint));
  box-shadow: 0 0 10px rgba(18, 185, 129, .45);
}

/* main column */
.qz-main { max-width: 760px; margin: 0 auto; padding: 0 28px; position: relative; }

/* question card */
.qz-card {
  background: var(--qz-card); border: 1px solid rgba(18, 185, 129, .25); border-radius: 20px;
  padding: 40px 36px; text-align: center;
  box-shadow: 0 0 0 1px rgba(18, 185, 129, .06), 0 16px 40px rgba(11, 11, 11, .08), 0 0 32px rgba(18, 185, 129, .06);
}
.qz-q-text { font-size: 21px; font-weight: 700; line-height: 1.65; margin: 0; }

/* options */
.qz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.qz-option {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--qz-card-2); border: 1px solid var(--qz-border); border-radius: 14px;
  padding: 16px 18px; cursor: pointer; transition: transform .15s, border-color .15s, background .15s;
  font: inherit; color: var(--qz-ink); width: 100%;
}
.qz-option:hover:not([data-state]) { border-color: rgba(18, 185, 129, .4); transform: translateY(-2px); }
.qz-option-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: rgba(11, 11, 11, .06);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--qz-ink-2);
}
.qz-option-text { font-size: 14.5px; font-weight: 600; line-height: 1.5; }

.qz-option[data-state="correct"] {
  border-color: var(--qz-mint); background: rgba(18, 185, 129, .08);
  box-shadow: 0 0 0 1px var(--qz-mint), 0 0 24px rgba(18, 185, 129, .25);
  animation: qz-bounce .4s ease;
}
.qz-option[data-state="correct"] .qz-option-icon { background: var(--qz-mint); color: #06251b; }
.qz-option[data-state="wrong"] {
  border-color: var(--qz-red); background: rgba(224, 67, 63, .08); animation: qz-shake .4s ease;
}
.qz-option[data-state="dim"] { opacity: .45; }
.qz-options.is-locked .qz-option { cursor: default; }

.qz-correct-tag {
  position: absolute; top: -11px; right: 14px; background: var(--qz-mint); color: #06251b;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(18, 185, 129, .45);
}

@keyframes qz-bounce {
  0% { transform: scale(1); } 35% { transform: scale(1.035); } 65% { transform: scale(.98); } 100% { transform: scale(1); }
}
@keyframes qz-shake {
  0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}

/* explanation accordion */
.qz-explain { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s ease, opacity .3s ease, margin-top .35s ease; margin-top: 0; }
.qz-explain.show { max-height: 480px; opacity: 1; margin-top: 20px; }
.qz-explain-inner { background: var(--qz-card-2); border-left: 3px solid var(--qz-mint); border-radius: 0 12px 12px 0; padding: 16px 20px; text-align: left; }
.qz-explain-inner.is-wrong { border-left-color: var(--qz-red); }
.qz-explain-label { font-size: 12px; font-weight: 800; color: var(--qz-mint); margin: 0 0 6px; }
.qz-explain-inner.is-wrong .qz-explain-label { color: var(--qz-red); }
.qz-explain-text { font-size: 14px; color: var(--qz-ink-2); line-height: 1.75; margin: 0; }

/* bottom bar */
.qz-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(249, 249, 247, .92); backdrop-filter: blur(16px); border-top: 1px solid var(--qz-border);
  box-shadow: 0 -4px 16px rgba(11, 11, 11, .06);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 24px;
}
.qz-nav-links { display: flex; gap: 26px; }
.qz-nav-link { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--qz-muted); }
.qz-nav-link .icon { font-size: 18px; }
.qz-nav-link.active { color: var(--qz-mint); }
.qz-next-btn {
  display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--qz-mint), var(--qz-mint-2));
  color: #06251b; font-weight: 800; font-size: 13.5px; padding: 12px 20px; border-radius: 12px;
  white-space: nowrap; opacity: .35; pointer-events: none; transition: opacity .2s, transform .2s, box-shadow .2s;
}
.qz-next-btn.unlocked { opacity: 1; pointer-events: auto; box-shadow: 0 8px 22px rgba(18, 185, 129, .35); }
.qz-next-btn.unlocked:hover { transform: translateY(-2px); }

@media (max-width: 860px) {
  .qz-header { padding: 16px 18px; }
  .qz-progress-wrap { padding: 0 18px 20px; }
  .qz-main { padding: 0 18px; }
  .qz-card { padding: 28px 20px; }
  .qz-bottom-nav { padding: 10px 14px; }
  .qz-nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  .qz-options { grid-template-columns: 1fr; }
  .qz-q-text { font-size: 18px; }
}
