/* ===== 设计令牌 ===== */
:root {
  --bg-1: #6d28d9;
  --bg-2: #2563eb;
  --bg-3: #06b6d4;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1f2937;
  --text-light: #64748b;
  --accent: #f59e0b;
  --accent-2: #ec4899;
  --success: #22c55e;
  --danger: #ef4444;
  --info: #3b82f6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --font: ui-rounded, "PingFang SC", "Microsoft YaHei", "Comic Sans MS", system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1e293b;
    --surface-2: #0f172a;
    --text: #f1f5f9;
    --text-light: #94a3b8;
  }
}

/* ===== 全局 ===== */
* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(110vh) scale(0.6); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-10vh) scale(1.1); opacity: 0; }
}

/* ===== 头部 ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-icon {
  font-size: 1.5rem;
  animation: pulseIcon 1.6s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.score-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.level-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
}

/* ===== 主视图 ===== */
main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 18px;
  padding-bottom: 90px;
}

.view {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view--active {
  display: block;
}

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

/* ===== 首页英雄区 ===== */
.hero {
  text-align: center;
  padding: 26px 18px 34px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
  pointer-events: none;
}

.hero__title {
  font-size: 1.7rem;
  font-weight: 900;
  margin: 0 0 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.hero__subtitle {
  margin: 0 0 24px;
  opacity: 0.95;
  font-size: 0.95rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  position: relative;
}

/* ===== 按钮 ===== */
.btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #f97316);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--info), #6366f1);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.btn--small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn--pulse {
  animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); }
}

/* ===== 卡组列表 ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.section-title {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.deck-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.deck-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.deck-card:hover, .deck-card:focus {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.deck-card__title {
  font-weight: 800;
  font-size: 1rem;
  margin: 0;
}

.deck-card__meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

.deck-card__actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}

.deck-card__actions .btn {
  padding: 8px 2px;
  font-size: 0.8rem;
}

/* ===== 题库浏览：结构化文本 ===== */
.browse-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.browse-title {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  text-align: center;
  flex: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.search-bar__icon {
  font-size: 1rem;
}

.search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
}

.search-bar__input::placeholder {
  color: var(--text-light);
}

.browse-list {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.browse-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow);
  text-align: left;
  border-left: 5px solid var(--info);
}

.browse-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.browse-card__number {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), #db2777);
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
}

.browse-card__question {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.5;
}

.browse-card__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.option-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 2px solid #e2e8f0;
  font-size: 0.95rem;
}

.option-chip__letter {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  font-weight: 900;
}

.option-chip--correct {
  background: #dcfce7;
  border-color: var(--success);
  color: #14532d;
  font-weight: 800;
}

.option-chip--correct .option-chip__letter {
  background: var(--success);
  color: #fff;
}

.browse-card__answer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #14532d;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.browse-card__explanation {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ===== 练习界面 ===== */
.study-hud {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.progress {
  position: relative;
  height: 18px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #facc15, var(--success));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.streak {
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.card-stage {
  max-width: 560px;
  margin: 0 auto;
  perspective: 1000px;
}

.energy-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: left;
  transform-style: preserve-3d;
  transition: transform var(--transition), border-color var(--transition);
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.energy-card--shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px) rotate(-2deg); }
  40% { transform: translateX(12px) rotate(2deg); }
  60% { transform: translateX(-8px) rotate(-1deg); }
  80% { transform: translateX(8px) rotate(1deg); }
}

.energy-card--pop {
  animation: pop 0.45s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.energy-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.energy-card__badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), #db2777);
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.energy-card__deck {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 700;
}

.energy-card__question {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0 0 20px;
  line-height: 1.55;
}

.energy-card__options {
  display: grid;
  gap: 12px;
}

.option-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 2px solid #e2e8f0;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--info);
  background: #eff6ff;
  transform: translateX(4px);
}

.option-btn--correct {
  background: #dcfce7 !important;
  border-color: var(--success) !important;
  color: #14532d !important;
}

.option-btn--wrong {
  background: #fee2e2 !important;
  border-color: var(--danger) !important;
  color: #7f1d1d !important;
}

.option-btn:disabled {
  cursor: default;
  opacity: 0.95;
}

/* 多选：可勾选高亮 + 提交按钮 */
.option-btn--multi {
  cursor: pointer;
}
.option-btn--selected {
  border-color: var(--info);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}
.study-submit {
  margin-top: 16px;
  width: 100%;
}

/* 主观题：作答区与参考答案 */
.subj-answer {
  width: 100%;
  margin-bottom: 12px;
}
.subj-ref {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #dcfce7;
  color: #14532d;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 浏览页题型徽标 */
.browse-card__type {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.option-letter {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ===== 卡通插图 ===== */
.illus-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.energy-card__illus {
  width: 100%;
  aspect-ratio: 320 / 170;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: #e2e8f0;
}

.energy-card__illus.is-pop {
  animation: pop 0.45s ease;
}

.browse-card__banner {
  width: 100%;
  aspect-ratio: 320 / 130;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  background: #e2e8f0;
}

.ce-illus {
  width: 100%;
  aspect-ratio: 320 / 150;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  background: #e2e8f0;
}

/* ===== 反馈区 ===== */
.feedback {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp 0.35s ease;
}

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

.feedback--correct {
  border-left: 6px solid var(--success);
}

.feedback--wrong {
  border-left: 6px solid var(--danger);
}

.feedback__icon {
  font-size: 3rem;
  margin-bottom: 6px;
}

.feedback__title {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.feedback__explanation {
  margin: 0 0 16px;
  color: var(--text-light);
  line-height: 1.7;
  font-size: 1rem;
}

/* ===== 结果界面 ===== */
.result-panel {
  max-width: 420px;
  margin: 20px auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-panel__emoji {
  font-size: 4rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.result-panel__title {
  margin: 12px 0 20px;
  font-size: 1.5rem;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
}

.stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--info);
}

.stat__label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.achievements {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.achievement-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #451a03;
  font-weight: 800;
  font-size: 0.85rem;
  animation: pop 0.5s ease;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.result-actions .btn {
  flex: 1;
}

/* ===== 编辑器 ===== */
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.editor-title {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
}

.editor-body {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field span {
  font-weight: 800;
  font-size: 0.9rem;
}

.input, .textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}

.input:focus, .textarea:focus {
  border-color: var(--info);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.editor-card-list {
  display: grid;
  gap: 10px;
}

.editor-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.editor-card-item:hover, .editor-card-item:focus {
  border-color: var(--info);
}

.editor-card-item__num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--info);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.editor-card-item__text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-card-item__status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #7f1d1d;
  font-weight: 800;
}

.editor-card-item--ready .editor-card-item__status {
  background: #dcfce7;
  color: #14532d;
}

.editor-add {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px dashed #cbd5e1;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  background: transparent;
  transition: var(--transition);
}

.editor-add:hover {
  border-color: var(--info);
  color: var(--info);
}

/* ===== 弹层 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal[hidden] {
  display: none;
}

.modal__content {
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 18px;
  animation: slideUp 0.3s ease;
}

.modal__content--card {
  max-width: 560px;
  border-radius: var(--radius);
  margin: auto 18px;
  max-height: 90vh;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.modal__footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.about-body {
  line-height: 1.7;
}

.about-body ul {
  padding-left: 18px;
  margin: 12px 0;
}

.about-body code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.card-edit-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== 成就列表 ===== */
.achievements-list {
  display: grid;
  gap: 10px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  opacity: 0.55;
}

.achievement-item--unlocked {
  opacity: 1;
  border: 2px solid var(--accent);
}

.achievement-item__icon {
  font-size: 1.8rem;
}

.achievement-item__info {
  flex: 1;
}

.achievement-item__name {
  font-weight: 800;
  display: block;
}

.achievement-item__desc {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ===== 底部导航 ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tab {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.tab--active, .tab:hover {
  color: var(--bg-1);
}

.tab__icon {
  font-size: 1.3rem;
}

/* ===== 提示条 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 40;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

/* ===== 危险操作按钮 ===== */
.btn--danger {
  background: linear-gradient(135deg, #ff6b8b, #ef4444);
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}
.btn--danger:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn--danger:active {
  transform: translateY(1px) scale(0.97);
}

/* ===== 确认弹层 ===== */
.modal__content--confirm {
  max-width: 440px;
  margin: 0 auto;
  border-radius: var(--radius);
}
.confirm-message {
  margin: 6px 0 0;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.82;
  white-space: pre-line;
  word-break: break-word;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  color: #fff;
  padding: 40px 20px;
  opacity: 0.9;
}

.empty-state__emoji {
  font-size: 3rem;
  margin-bottom: 10px;
}

/* ===== 无障碍与适配 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 640px) {
  main {
    padding: 28px;
    padding-bottom: 90px;
  }
  .hero {
    padding: 40px 28px;
  }
  .hero__title {
    font-size: 2.2rem;
  }
  .energy-card__question {
    font-size: 1.5rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
