﻿* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #eef2f7;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶栏：典型网站导航 */
.siteNav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.siteNavInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
}

.siteBrand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.siteLogo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  flex-shrink: 0;
}

.siteTitle {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.siteSubtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #64748b;
}

/* 主内容区：宽屏居中 */
.siteMain {
  flex: 1;
  width: 100%;
}

.siteMainInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px 40px;
}

.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.panelHead {
  margin-bottom: 16px;
}

.panelTitle {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
}

.progressPanel {
  padding: 20px 24px;
  margin-bottom: 20px;
}

.placeholderTitle {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 400;
}

.placeholderTitle strong {
  color: #1e293b;
  font-weight: 700;
}

.placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.placeholder {
  min-width: 72px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: #fafbfc;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.placeholder.filled {
  border-style: solid;
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* 双栏：左练习、右列表 */
.learnGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.learnPanel {
  padding: 24px 28px;
}

.foundPanel {
  padding: 20px 24px;
  min-height: 420px;
  max-height: 560px;
  display: flex;
  flex-direction: column;
}

.regionMiddle {
  overflow: hidden;
}

.foundList {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.foundTitle {
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.foundEmpty {
  padding: 48px 16px;
  text-align: center;
}

.foundEmptyTitle {
  color: #64748b;
  font-size: 1rem;
  margin: 0 0 8px;
}

.foundEmptyHint {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.foundItem {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.foundItem:last-child {
  border-bottom: none;
}

.foundWordRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foundWord {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
}

.foundMeaning {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.selectHint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
}

.selectedBar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.selectedLabel {
  color: #64748b;
  font-size: 0.92rem;
}

.selectedValue {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 600;
  min-height: 1.2em;
}

.wordSelect {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 96px;
  width: 100%;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 16px 20px;
  user-select: none;
  touch-action: none;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.wordSelect.alignStart {
  justify-content: flex-start;
}

.letters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.letter {
  flex-shrink: 0;
  padding: 6px 8px;
  margin: 2px;
  line-height: 1;
  font-size: 2.25rem;
  color: #0f172a;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.letter:hover {
  background: #e2e8f0;
}

.letter.selected {
  background: #dbeafe;
  color: #1d4ed8;
}

.phoneticText {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.phoneticTextSmall {
  font-size: 0.85rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.mainExplain {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.meaning {
  color: #475569;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.btnRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  min-width: 120px;
  padding: 11px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
}

/* 页脚：全宽底栏 */
.siteFooter {
  margin-top: auto;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.siteFooterInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  text-align: center;
}

.siteFooterBeian {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
}

.siteFooterBeian:hover {
  color: #64748b;
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  top: 88px;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 窄屏仍可用，但默认按桌面排布 */
@media (max-width: 900px) {
  .siteNavInner,
  .siteMainInner,
  .siteFooterInner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .learnGrid {
    grid-template-columns: 1fr;
  }

  .foundPanel {
    min-height: 280px;
    max-height: 360px;
  }
}
