/* ============================================
   GOUP 语文游戏化样式
   移动端优先 (375px 基准)
   ============================================ */

/* ─── 通用容器 ─── */
.chinese-game {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  background: #fafafa;
}

.cg-header {
  padding: 18px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.cg-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}
.cg-meta {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 13px;
  color: #999;
}

.cg-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  -webkit-overflow-scrolling: touch;
}

/* ─── 成语接龙 ─── */
.cg-current-word {
  text-align: center;
  padding: 20px 16px;
  background: #FFFDE7;
  border-radius: 16px;
  margin-bottom: 20px;
}
.cg-word-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}
.cg-word-display {
  font-size: 32px;
  font-weight: 700;
  color: #E65100;
  letter-spacing: 8px;
}
.cg-word-hint {
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}
.cg-word-hint b {
  color: #FF5722;
  font-size: 18px;
}

.cg-input-area {
  display: flex;
  gap: 10px;
}
.cg-input {
  flex: 1;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 20px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.2s;
}
.cg-input:focus {
  border-color: #FFD700;
}
.cg-submit {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.cg-feedback {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
  animation: fadeInUp 0.3s ease;
}
.cg-fb-success { background: #E8F5E9; color: #2E7D32; }
.cg-fb-error { background: #FFEBEE; color: #C62828; }
.cg-fb-warn { background: #FFF8E1; color: #F57F17; }

.cg-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  align-items: center;
  font-size: 14px;
  color: #999;
}
.cg-chain-item {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.cg-correct { background: #E8F5E9; color: #2E7D32; }
.cg-wrong { background: #FFEBEE; color: #C62828; }

.cg-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 14px;
}

.cg-result-score {
  font-size: 48px;
  font-weight: 800;
  color: #FF9800;
}
.cg-result-detail {
  font-size: 15px;
  color: #666;
  margin-top: 8px;
  line-height: 1.6;
}

/* ─── 错别字侦探 ─── */
.typo-sentence {
  font-size: 20px;
  line-height: 2.2;
  letter-spacing: 2px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eee;
  margin-bottom: 12px;
  text-align: center;
}
.typo-char {
  display: inline-block;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  position: relative;
}
.typo-char:active {
  transform: scale(1.1);
}
.typo-found {
  background: #E8F5E9;
  color: #2E7D32;
  font-weight: 700;
  box-shadow: 0 0 0 2px #4CAF50;
}
.typo-spot {
  /* 错字位置有潜在样式，但不过分提示 */
}
.typo-wrong-click {
  background: #FFEBEE;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.typo-counter {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}
.typo-counter b {
  color: #FF5722;
  font-size: 18px;
}

/* ─── 好词好句 ─── */
.quote-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-textarea {
  border: 1.5px solid #E0E0E0;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.6;
}
.quote-textarea:focus {
  border-color: #FFD700;
}
.quote-source {
  border: 1.5px solid #E0E0E0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.quote-source:focus {
  border-color: #FFD700;
}

.quote-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quote-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #eee;
}
.quote-card-text {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  font-style: italic;
}
.quote-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}
.quote-del {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

/* ─── 诗词填空 ─── */
.poetry-line {
  font-size: 22px;
  line-height: 1.8;
  color: #333;
  letter-spacing: 2px;
  background: #FFFDE7;
  border-radius: 12px;
  padding: 20px 16px;
}
.poetry-source {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}
.poetry-input {
  font-size: 24px;
  width: 80px;
  text-align: center;
  letter-spacing: 4px;
}
.poetry-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: #FFF8E1;
  border-radius: 10px;
  font-size: 13px;
  color: #F57F17;
  animation: fadeInUp 0.3s ease;
}
