/* Translate practice page styles */

.translate-main { max-width: 1000px; }

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.topic-tab {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.topic-tab:hover { background: #f9fafb; color: #111827; }
.topic-tab.active { background: #2c6cf6; color: #ffffff; border-color: #2c6cf6; }
.topic-tab .tt-count {
  font-size: 11px;
  opacity: 0.75;
  margin-left: 4px;
}

.translate-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  border: 1px solid #f1f5f9;
}

.tc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tc-topic {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}
.tc-progress { font-size: 13px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.tc-progress b { color: #2c6cf6; font-size: 15px; font-weight: 700; }

.tc-cn {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  line-height: 1.6;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f0f6ff 0%, #fef5ee 100%);
  border-radius: 12px;
  margin-bottom: 18px;
  border-left: 4px solid #2c6cf6;
}

.tc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hint-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hint-btn:hover { background: #f9fafb; color: #111827; }
.hint-btn.is-active { background: #fef3c7; color: #b45309; border-color: #fde68a; }

.hint-box {
  background: #fefce8;
  border-left: 3px solid #facc15;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 14px;
  animation: slideDown 0.2s ease;
}
.hint-box.hint-answer {
  background: #f0fdf4;
  border-left-color: #4ade80;
}
.hint-label {
  font-size: 12px;
  font-weight: 700;
  color: #854d0e;
  margin-bottom: 6px;
}
.hint-answer .hint-label { color: #166534; }
.hint-content {
  font-size: 14px;
  color: #1f2937;
  line-height: 1.7;
}
.hint-content code {
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: -apple-system, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

/* 参考答案文字 */
.answer-text {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
  line-height: 1.6;
}

/* breakdown chunks */
.hint-pattern { margin-bottom: 10px; }
.hint-breakdown {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}
.hb-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}
.hb-chunks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hb-chunk {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px 4px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.hb-chunk small {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  opacity: 0.7;
  letter-spacing: 0.2px;
}
.hb-subj { background: #dbeafe; color: #1e40af; }
.hb-verb { background: #d1fae5; color: #047857; }
.hb-obj  { background: #fce7f3; color: #be185d; }
.hb-attr { background: #ede9fe; color: #6d28d9; }
.hb-adv  { background: #fef3c7; color: #92400e; }

.vocab-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed #fde68a;
}
.vocab-row:last-child { border-bottom: none; }
.vocab-cn { font-weight: 600; color: #1f2937; min-width: 90px; }
.vocab-en { color: #4b5563; font-size: 13.5px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tc-input {
  width: 100%;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #1f2937;
  outline: none;
  resize: vertical;
  margin-top: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
  line-height: 1.6;
}
.tc-input:focus { border-color: #2c6cf6; background: #ffffff; }
.tc-input::placeholder { color: #9ca3af; }

.tc-result {
  padding: 16px 18px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
}
.tc-result.is-correct {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.tc-result.is-semantic {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde68a;
}
.tc-result.is-wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.tcr-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.tcr-line { display: flex; gap: 10px; margin-top: 6px; }
.tcr-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  min-width: 80px;
  flex-shrink: 0;
  padding-top: 2px;
}
.tcr-text { flex: 1; line-height: 1.7; word-break: break-word; }
.tcr-text .rt-good { color: #047857; font-weight: 600; }
.tcr-text .rt-bad { color: #b91c1c; font-weight: 600; text-decoration: line-through; }
.tcr-text .rt-missing { color: #b91c1c; font-weight: 600; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: #fca5a5; }

.tc-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.tc-footer .btn-next { margin-left: auto; }

#btnFav.is-active { background: #fef3c7; color: #b45309; border-color: #fde68a; }
#btnFav .icon-active { display: none; color: #f59e0b; }
#btnFav.is-active .icon-inactive { display: none; }
#btnFav.is-active .icon-active { display: inline-block; }

@media (max-width: 760px) {
  .translate-card { padding: 20px 18px; }
  .tc-cn { font-size: 18px; padding: 14px 16px; }
  .tc-footer { gap: 6px; }
}
