/* ============================================================
   Spelling Challenge Game — Styles
   单词拼写挑战游戏样式 & 新增大厅分类样式
   ============================================================ */

/* ---- Spelling — 青色/薄荷绿主题 ---- */
.vocab-game-page--spelling {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #06b6d4 100%);
}
.vocab-game-page--spelling .vocab-game__btn--primary {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  color: #083344;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}
.vocab-game-page--spelling .vocab-game__btn--primary:hover {
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
}
.vocab-game-page--spelling .vocab-game__btn--secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.vocab-game-page--spelling .vocab-game__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}
.vocab-game-page--spelling .vocab-game__btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.vocab-game-page--spelling .vocab-game__btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.vocab-game-page--spelling .vocab-game__score {
  color: #67e8f9;
}
.vocab-game-page--spelling .vocab-game__vocab-count strong {
  color: #0e7490;
}
.vocab-game-page--spelling .vocab-game__high-score-value {
  color: #0e7490;
}
.vocab-game-page--spelling .vocab-game__final-score {
  background: linear-gradient(135deg, #0c4a6e 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.vocab-game-page--spelling .vocab-game__new-record {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  color: #083344;
}
@keyframes spellingRecordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
}
.vocab-game-page--spelling .vocab-game__new-record {
  animation: spellingRecordPulse 1.2s ease-in-out infinite;
}
.vocab-game-page--spelling .vocab-game__combo-popup {
  background: #06b6d4;
  color: #083344;
}

/* ---- Spelling game specific ---- */
.spelling-meaning {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.4;
  word-wrap: break-word;
}

.spelling-hint {
  font-family: 'Courier New', 'SF Mono', Menlo, monospace;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--aussie-blue);
  text-align: center;
  margin-top: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 2px dashed #bae6fd;
  user-select: none;
}

.spelling-input-wrap {
  position: relative;
  margin: 24px auto 20px;
  max-width: 500px;
  transition: all 0.25s ease;
}

.spelling-input {
  width: 100%;
  padding: 18px 24px;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 2px;
  border: 3px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.spelling-input:focus {
  border-color: var(--aussie-blue);
  box-shadow: 0 0 0 4px rgba(8, 94, 170, 0.15);
}

.spelling-input-wrap.is-correct .spelling-input {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.spelling-input-wrap.is-wrong .spelling-input {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
  animation: spellingShake 0.4s ease;
}

.spelling-input-wrap.is-skipped .spelling-input {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

@keyframes spellingShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.spelling-correct-answer {
  text-align: center;
  margin-top: 12px;
  font-size: 16px;
  color: #065f46;
  animation: fadeInUp 0.3s ease;
}

.spelling-correct-answer strong {
  font-size: 22px;
  font-weight: 700;
  margin-left: 8px;
  color: #059669;
  letter-spacing: 1px;
}

.spelling-correct-answer.is-skipped {
  color: #92400e;
}
.spelling-correct-answer.is-skipped strong {
  color: #d97706;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.spelling-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ---- 词库选择 ---- */
.spelling-bank-select {
  margin: 20px auto 16px;
  max-width: 500px;
  text-align: center;
}

.spelling-bank-select__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.spelling-bank-select__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.spelling-bank-select__btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.spelling-bank-select__btn:hover {
  border-color: var(--aussie-blue);
  color: var(--aussie-blue);
}

.spelling-bank-select__btn.is-active {
  background: var(--aussie-blue);
  border-color: var(--aussie-blue);
  color: #fff;
}

.vocab-game-page--spelling .spelling-bank-select__btn.is-active {
  background: #06b6d4;
  border-color: #06b6d4;
}

.vocab-game-page--spelling .spelling-bank-select__btn:hover {
  border-color: #0891b2;
  color: #0891b2;
}

.vocab-game-page--spelling .spelling-hint {
  color: #0e7490;
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  border-color: #a5f3fc;
}

/* ---- 大厅分类 ---- */
.vocab-hall__category {
  margin-bottom: 40px;
}

.vocab-hall__category:last-child {
  margin-bottom: 0;
}

.vocab-hall__category-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.vocab-hall__category-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---- 大厅新游戏卡片主题色 ---- */
.vocab-hall-card--spelling {
  border-top-color: #06b6d4;
}
.vocab-hall-card--spelling .vocab-hall-card__btn {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  color: #083344;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.vocab-hall-card--quiz {
  border-top-color: #a855f7;
}
.vocab-hall-card--quiz .vocab-hall-card__btn {
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

/* 响应式 */
@media (max-width: 640px) {
  .spelling-meaning {
    font-size: 24px;
  }
  .spelling-hint {
    font-size: 26px;
    letter-spacing: 3px;
    padding: 12px 16px;
  }
  .spelling-input {
    font-size: 18px;
    padding: 14px 18px;
  }
  .spelling-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}
