/* ============================================================
   我的：档案、成绩、趋势、AI 分析、复议
   ============================================================ */

.my-root { padding-bottom: 30px; }

.my-loading { display: grid; gap: 18px; }
.my-skeleton-lg { height: 160px; border-radius: 22px; }
.my-loading-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.my-skeleton-sm { height: 92px; border-radius: 16px; }

/* ---------- 未登录 ---------- */
.locked-card {
  position: relative;
  overflow: hidden;
  padding: 46px 44px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f1f8ff 60%, #e5f0ff);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

.locked-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 198, 255, .45), transparent 70%);
}

.locked-inner { position: relative; display: flex; align-items: center; gap: 26px; }

.locked-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: var(--blue-100);
  color: var(--blue-600);
  flex: none;
}

.locked-icon svg { width: 38px; height: 38px; }
.locked-copy h2 { font-size: 24px; }
.locked-copy p { max-width: 560px; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.locked-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.preview-block { margin-top: 26px; }

.preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 600;
}

.preview-title svg { width: 16px; height: 16px; flex: none; color: var(--blue-500); }

.ai-foot { margin-top: 14px; color: var(--muted-2); font-size: 11px; }
.ai-foot svg { width: 12px; height: 12px; vertical-align: -2px; display: inline-block; }

.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.preview-card {
  position: relative;
  min-height: 150px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}

.preview-card.is-blur { filter: blur(3px); opacity: .55; user-select: none; }
.preview-card h3 { font-size: 14px; margin-bottom: 8px; }
.preview-card p { color: var(--muted); font-size: 12px; line-height: 1.7; }

.preview-bars { display: grid; gap: 8px; margin-top: 14px; }
.preview-bars span { height: 8px; border-radius: 4px; background: var(--blue-100); }
.preview-bars span:nth-child(2) { width: 78%; }
.preview-bars span:nth-child(3) { width: 56%; }

.preview-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--blue-700);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(242, 248, 255, .28);
}

.preview-lock svg { width: 15px; height: 15px; }

/* ---------- 个人信息 ---------- */
.profile-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 30px;
  border-radius: 22px;
  background: linear-gradient(130deg, #1f4fbe 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(30, 78, 190, .24);
}

.profile-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  flex: none;
}

.profile-main { min-width: 0; flex: 1 1 240px; }
.profile-main h2 { color: #fff; font-size: 24px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.profile-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .92);
  font-size: 11.5px;
}

.profile-actions { margin-left: auto; display: flex; gap: 8px; position: relative; z-index: 1; }
.profile-actions .btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.profile-actions .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- 统计 ---------- */
.my-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }

.stat-card {
  padding: 20px 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
}

.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.stat-card strong em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 400; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 11px; }

/* ---------- 区块 ---------- */
.my-section { margin-top: 22px; }

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-bar h2 { font-size: 17px; }
.section-bar p { margin-top: 2px; color: var(--muted); font-size: 12px; }

.panel {
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
}

/* 最近答题 */
.attempt-list { display: grid; gap: 2px; }

.attempt-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.attempt-row:last-child { border-bottom: 0; }

.attempt-main { min-width: 0; flex: 1; }
.attempt-main h3 { font-size: 14px; }
.attempt-main h3 a { color: var(--navy); }
.attempt-main p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }

.attempt-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 70px;
  justify-content: flex-end;
  color: var(--navy);
  font-weight: 700;
}

.attempt-score strong { font-size: 22px; line-height: 1; }
.attempt-score span { color: var(--muted); font-size: 11px; font-weight: 400; }
.attempt-score.good strong { color: var(--success); }
.attempt-score.mid strong { color: var(--blue-600); }
.attempt-score.low strong { color: var(--warning); }

/* 编者 · 试卷管理 */
.manage-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.manage-row:last-child { border-bottom: 0; }
.manage-main { min-width: 0; flex: 1; }
.manage-main h3 { font-size: 14.5px; }
.manage-main p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.manage-actions { display: flex; gap: 8px; flex: none; }

/* 趋势图 */
.chart-wrap { padding: 8px 4px 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #e8f1fd; stroke-width: 1; }
.chart-axis { fill: #94a3b8; font-size: 10px; }
.chart-line { fill: none; stroke: var(--blue-600); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url("#trendFill"); opacity: .7; }
.chart-dot { fill: #fff; stroke: var(--blue-600); stroke-width: 2; }
.chart-dot-label { fill: var(--navy); font-size: 9.5px; font-weight: 600; }

.chart-empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* AI 分析 */
.ai-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(150deg, #f7fbff, #eef6ff 60%, #e7f1ff);
  border: 1px solid #dbe9ff;
  box-shadow: var(--shadow-xs);
}

.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .28);
}

.ai-badge svg { width: 20px; height: 20px; }
.ai-head h2 { font-size: 17px; }
.ai-head p { color: var(--muted); font-size: 11.5px; }
.ai-head .btn { margin-left: auto; }

.ai-summary {
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  color: #375579;
  font-size: 13.5px;
  line-height: 1.8;
}

.ai-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }

.ai-col {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
}

.ai-col h3 { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.ai-col h3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-500); }
.ai-col.is-good h3 i { background: var(--success); }
.ai-col.is-weak h3 i { background: var(--warning); }
.ai-col ul { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 15px; color: #47617f; font-size: 12px; line-height: 1.7; }

.ai-reco {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  color: #47617f;
}

.ai-reco strong { color: var(--navy); }
.ai-reco a { margin-left: auto; font-weight: 600; white-space: nowrap; }

.ai-foot { margin-top: 14px; color: var(--muted-2); font-size: 11px; }

.ai-loading { display: grid; gap: 10px; }
.ai-loading span { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .8); }
.ai-loading span:nth-child(2) { width: 82%; }
.ai-loading span:nth-child(3) { width: 64%; }

/* 复议 */
.appeal-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.appeal-row:last-child { border-bottom: 0; }
.appeal-main { flex: 1; min-width: 0; }
.appeal-main h3 { font-size: 13.5px; }
.appeal-main p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.appeal-reply { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--blue-50); color: #375579; font-size: 12px; }

/* 空态 */
.my-empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.my-empty .btn { margin-top: 12px; }

@media (max-width: 980px) {
  .my-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-columns { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .locked-card { padding: 28px 22px; }
  .locked-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .profile-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 22px; }
  .profile-avatar { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
  .profile-actions { grid-column: 1 / -1; margin-left: 0; width: auto; margin-top: 2px; justify-content: flex-end; }
  .attempt-row { flex-wrap: wrap; }
  .attempt-row .btn { margin-left: auto; }
  .manage-row { flex-wrap: wrap; gap: 10px; }
  .manage-actions { width: 100%; }
  .manage-actions .btn { flex: 1; }
  .panel { padding: 18px; }
  .ai-card { padding: 20px; }
  .my-root { padding-bottom: 10px; }
}
