/* Word Games - shared polish for vocabulary & puzzles */

.word-game .game-header {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, var(--surface) 55%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid #3498db;
}

.word-game .stat-card {
  border-left: 3px solid #3498db;
}

.word-game .stat-value--pulse {
  animation: word-stat-pulse 0.45s ease;
}

@keyframes word-stat-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); color: var(--success); }
  100% { transform: scale(1); }
}

.word-start {
  text-align: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.word-howto {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.word-howto__title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.word-howto__list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.word-difficulty {
  margin: 1rem 0 1.25rem;
}

.word-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.word-progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.word-progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3498db, #00b894);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.word-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  max-width: min(92vw, 400px);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.word-toast--success { border-color: var(--success); background: rgba(39, 174, 96, 0.12); }
.word-toast--error { border-color: var(--danger); background: rgba(231, 76, 60, 0.1); }
.word-toast--info { border-color: #3498db; background: rgba(52, 152, 219, 0.1); }

.word-topic-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2980b9;
  background: rgba(52, 152, 219, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.word-sentence-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid #3498db;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.word-sentence-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.word-sentence-quote {
  display: block;
  font-size: 1.05rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
}

.word-scramble-display {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-align: center;
  color: #3498db;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 0.75rem;
  margin: 1rem 0;
}

.word-hint-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.word-game .jumble-chip {
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}

.word-game .jumble-chip:hover {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.08);
  transform: translateY(-1px);
}

.word-answer-line {
  min-height: 52px;
  border: 2px dashed #3498db;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.word-game .wordsearch-grid .ws-cell {
  transition: background 0.15s, color 0.15s;
}

.word-game .wordsearch-grid .ws-cell--found {
  background: rgba(0, 184, 148, 0.25);
  color: #00b894;
  font-weight: 800;
}

.word-game .wordsearch-grid .ws-cell--selecting {
  background: rgba(52, 152, 219, 0.25);
}

.word-game .hangman-drawing {
  margin: 0 auto 1rem;
}

.word-streak-badge {
  display: inline-block;
  background: linear-gradient(135deg, #3498db, #00b894);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.35rem;
}

.word-game .reading-passage {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(52, 152, 219, 0.08);
  border-left: 4px solid #3498db;
  border-radius: 0 8px 8px 0;
  line-height: 1.65;
  font-size: 0.95rem;
  color: var(--text);
}

.word-game .jumble-chip--sentence {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: left;
  line-height: 1.5;
  font-weight: 500;
  white-space: normal;
}

.word-game .para-answer-line {
  min-height: 120px;
  flex-direction: column;
  align-items: stretch;
}

.word-game .para-answer-line .jumble-chip--picked {
  width: 100%;
  text-align: left;
}

.para-prompt {
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

/* Rhyme + Missing letter */
.word-rhyme-prompt,
.word-miss-prompt {
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.word-rhyme-cue {
  text-align: center;
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 1.25rem;
  letter-spacing: 0.04em;
}
.word-miss-word {
  text-align: center;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0.5rem 0 1.25rem;
  font-variant-numeric: tabular-nums;
}
.word-miss-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.word-miss-btn {
  min-width: 56px;
  font-size: 1.25rem;
  font-weight: 800;
}
