@import url("../styles-shared.css");

.game-intro h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--llm-navy);
}

.game-intro__block {
  margin-bottom: 0.75rem;
}

.game-intro__block h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--llm-navy);
}

.game-intro__block p,
.game-intro__block ul {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
}

.game-intro__block ul {
  padding-left: 1.25rem;
}

.game-intro__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
}

.game-intro__skills li {
  background: #e8f2fc;
  border: 1px solid #b8cfe6;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.game-intro__hint,
.philosophy,
.subtitle {
  font-size: 1.05rem;
  line-height: 1.55;
}

.subtitle {
  font-weight: 600;
  color: var(--llm-navy);
}

.wq-coming-soon-note {
  font-size: 0.95rem;
  color: var(--llm-muted);
  margin: 0.5rem 0 1rem;
}

.wl-start-btn {
  width: 100%;
  max-width: 20rem;
  min-height: 3rem;
  font-size: 1.1rem;
}

.load-status {
  text-align: center;
  color: var(--llm-muted);
  margin: 0 0 1rem;
}

.load-status--error {
  color: #8a1f1f;
  font-weight: 600;
}

.reflection-style-picker {
  margin: 1rem 0;
}

.reflection-style-picker__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.reflection-style-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.reflection-style-picker__btn {
  min-height: 2.85rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid var(--llm-border);
  background: #fff;
  cursor: pointer;
}

.reflection-style-picker__btn[aria-checked="true"] {
  border-color: var(--llm-accent);
  background: #e8f2fc;
  font-weight: 700;
}

.sound-toggle-wrap {
  margin: 0.75rem 0 1rem;
}

.sound-toggle {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--llm-border);
  background: #fff;
  cursor: pointer;
}

/* --- Play layout: progress vs Q&A --- */
.game-panel[hidden],
.wl-is-hidden {
  display: none !important;
}

.game-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.game-outcome-panel:not([hidden]) {
  display: block;
}

.wl-complete-progress {
  margin: 0 0 0.75rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--llm-navy);
}

.wl-progress-card {
  background: #e8eef4;
  border: 1px solid #c5d4e4;
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  margin: 0;
}

.wl-progress-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--llm-navy);
}

.wl-progress-card .wq-stats-bar {
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #c5d4e4;
}

.wl-ladder-mount {
  margin: 0;
}

.wl-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
  max-width: 100%;
}

.wl-progress-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #c5d4e4;
  flex-shrink: 0;
}

.wl-progress-dot--done {
  background: var(--llm-success, #1a6b3c);
}

.wl-progress-dot--current {
  width: 0.85rem;
  height: 0.85rem;
  background: var(--llm-accent, #0a5cad);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--llm-accent, #0a5cad);
}

.wl-progress-dot--ahead {
  background: #b8c9d9;
}

.wl-ladder-summary {
  margin: 0.35rem 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--llm-muted);
}

.wl-ladder-summary--done {
  color: var(--llm-navy);
  font-weight: 600;
}

.wl-ladder-summary__check {
  color: var(--llm-success, #1a6b3c);
  margin-right: 0.2rem;
}

.wl-ladder-summary--remaining {
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.wl-ladder-visible {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wl-rung-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #c5d4e4;
  background: #f4f7fa;
  font-size: 0.98rem;
}

.wl-rung-detail--current {
  border-color: var(--llm-accent, #0a5cad);
  border-width: 2px;
  background: #dceaf8;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.6rem 0.75rem;
}

.wl-rung-detail--next {
  background: #f0f4f8;
  font-weight: 600;
}

.wl-rung-detail--next2 {
  opacity: 0.92;
}

.wl-rung-detail__label {
  color: var(--llm-navy);
}

.wl-rung-detail__pts {
  margin-left: auto;
  font-size: 0.92rem;
  color: var(--llm-muted);
  font-weight: 600;
}

.wl-rung-detail--current .wl-rung-detail__pts {
  color: var(--llm-navy);
}

/* Q&A card — blue, distinct from progress */
.wl-qa-card {
  background: linear-gradient(165deg, #1b5a8c 0%, #0c3d6b 55%, #0a3359 100%);
  border: 1px solid #082a47;
  border-radius: 12px;
  padding: 1rem 1.1rem 1.15rem;
  margin: 0;
  box-shadow: 0 4px 14px rgba(10, 40, 70, 0.22);
  color: #f0f6fc;
}

.wl-qa-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.wl-qa-card__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
}

.wl-timer {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0c3d6b;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  min-width: 5.5rem;
  text-align: center;
}

.wl-timer--low {
  color: #7a4a00;
  border-color: #e8c878;
  background: #fff4e0;
  animation: wl-timer-pulse 1.4s ease-in-out infinite;
}

.wl-timer--off {
  font-weight: 600;
  color: #d8e8f8;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  animation: none;
}

@keyframes wl-timer-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.82;
  }
}

.wl-timer-banner {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #e8f2fc;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.wl-help-lines {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.wl-help-lines__title {
  margin: 0 0 0.15rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
}

.wl-help-lines__hint {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: #c5daf0;
}

.wl-qa-card .wq-lifelines {
  margin-bottom: 0;
}

.wl-qa-card .wq-lifeline-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #0c3d6b;
  border-color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.wl-qa-card .wq-lifeline-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: #ffffff;
}

.wl-qa-card .wq-lifeline-btn--used:disabled {
  opacity: 0.78;
  background: rgba(255, 255, 255, 0.55);
  color: #1a3d5c;
  border-color: rgba(255, 255, 255, 0.35);
}

.wl-qa-card .wq-hint-box,
.wl-qa-card .wq-source-box {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #f0f6fc;
}

.wl-qa-card .wq-hint-box strong,
.wl-qa-card .wq-source-box strong {
  color: #ffffff;
}

.wl-qa-card .wq-source-box .llm-link {
  color: #b8e0ff;
  font-weight: 600;
}

.wl-qa-card .wq-question {
  margin-top: 0.25rem;
  font-size: 1.14rem;
  color: #ffffff;
  line-height: 1.5;
}

.wl-qa-card .wq-choice {
  background: #ffffff;
  color: #1a2d42;
  border-color: rgba(255, 255, 255, 0.85);
}

.wl-qa-card .wq-choice:hover:not(:disabled) {
  border-color: #7ec0ff;
  background: #f8fbff;
}

.wl-qa-card .wq-choice:disabled {
  opacity: 0.55;
}

.wl-qa-card .wq-choice--correct {
  border-color: #2d8a4e;
  background: #e8f7ed;
  color: #123d24;
}

.wl-qa-card .wq-choice--picked.wq-choice--wrong {
  border-color: #c45c00;
  background: #fff4e8;
  color: #5a3200;
}

.wl-qa-card .wq-feedback {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  color: #1a2d42;
  border-color: rgba(255, 255, 255, 0.5);
}

.wl-qa-card .wq-feedback--ok {
  background: #edf7f0;
  border-color: #9fd4b0;
}

.wl-qa-card .wq-feedback--learn {
  background: #f5f9fc;
  border-color: #b8cfe6;
}

.wl-qa-card .wq-feedback h3,
.wl-qa-card .wl-feedback-result {
  color: #1a2d42;
}

.wl-qa-card .wq-feedback .llm-link {
  color: var(--llm-accent);
}

.wl-feedback-top {
  margin-bottom: 0;
}

.wl-feedback-result {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  line-height: 1.35;
}

.wl-continue-btn {
  width: 100%;
  min-height: 3.1rem;
  font-size: 1.08rem;
  margin: 0;
}

.wl-feedback-details {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--llm-border);
  font-size: 1rem;
  line-height: 1.5;
  max-height: min(38vh, 14rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wl-feedback-details p {
  margin: 0 0 0.5rem;
}

.wl-feedback-details p:last-child {
  margin-bottom: 0;
}

.game-outcome-panel .game-result {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

#gameReflectionMount {
  display: block;
  margin: 0.75rem 0 0;
}

.wl-game-reflection {
  display: block;
  margin: 0;
  padding: 1rem 1.05rem;
  background: #ffffff;
  border: 1px solid #c5d4e4;
  border-radius: 10px;
  color: var(--llm-text);
}

.wl-game-reflection__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--llm-navy);
}

.wl-game-reflection__intro,
.wl-game-reflection__path,
.wl-game-reflection__word,
.wl-game-reflection__meaning {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--llm-text);
}

.wl-game-reflection__label {
  color: var(--llm-muted);
  font-weight: 600;
}

.wl-game-reflection__path strong,
.wl-game-reflection__word strong {
  color: var(--llm-navy);
}

.wl-game-reflection__copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--llm-border);
}

.copy-reflection-status {
  font-size: 0.95rem;
  color: var(--llm-muted);
}

@media (min-width: 520px) {
  .reflection-style-picker__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .wl-progress-dots {
    gap: 0.28rem;
  }

  .wl-progress-dot {
    width: 0.55rem;
    height: 0.55rem;
  }

  .wl-rung-detail--current {
    font-size: 1.02rem;
  }
}
