/* =================================================================
   "一沙一世界" 视觉系统
   主题: 沙金 / 赭石 / 土黄 / 浅米 / 岩层棕 / 绿洲绿 / 天空蓝
   ================================================================= */

:root {
  --sand-50: #fbf6ec;
  --sand-100: #f4e9d2;
  --sand-200: #ecd6a8;
  --sand-300: #dfbb78;
  --sand-400: #cf9d52;
  --sand-500: #bd8136;
  --sand-600: #a3672a;
  --sand-700: #7e4f23;
  --sand-800: #5b3a1f;
  --sand-900: #3d2715;
  --terra: #a85a32;
  --ochre: #b8852c;
  --oasis: #4f8a5b;
  --sky-soft: #a9c8d6;
  --paper: #fcf6e8;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Noto Serif SC', sans-serif;
  color: var(--sand-900);
  overflow-x: hidden;
  background-color: #efd5a3;
}

body {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, #f6e7c2 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, #e5c79a 0%, transparent 50%),
    linear-gradient(180deg, #f9ecd0 0%, #efd5a3 45%, #d9b27a 100%);
  background-attachment: fixed;
}

#root {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

/* ============== 背景沙丘和飘浮沙粒 ============== */

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

.sand-dune {
  position: absolute;
  left: -10%;
  right: -10%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  filter: blur(2px);
  opacity: 0.85;
}

.sand-dune-a {
  bottom: -45%;
  height: 80%;
  background: radial-gradient(ellipse at center top, #d6a86a 0%, #b5803e 60%, #8b5d2a 100%);
  opacity: 0.55;
}
.sand-dune-b {
  bottom: -55%;
  height: 90%;
  left: -15%; right: 30%;
  background: radial-gradient(ellipse at center top, #e9c389 0%, #c89856 70%, #946730 100%);
  opacity: 0.45;
}
.sand-dune-c {
  bottom: -60%;
  height: 95%;
  left: 35%; right: -20%;
  background: radial-gradient(ellipse at center top, #f1d49a 0%, #d9ab63 70%, #a07338 100%);
  opacity: 0.4;
}

#sand-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============== 通用UI元素 ============== */

.font-display { font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif; letter-spacing: 0.04em; }
.font-serif-cn { font-family: 'Noto Serif SC', serif; }

.glass-card {
  background: linear-gradient(160deg, rgba(255, 250, 235, 0.92), rgba(248, 232, 197, 0.78));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(189, 129, 54, 0.18);
  border-radius: 22px;
  box-shadow:
    0 24px 56px -28px rgba(94, 58, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.paper-card {
  background:
    radial-gradient(120% 80% at 0% 0%, #fff8e7 0%, transparent 60%),
    radial-gradient(120% 80% at 100% 100%, #fbe9c4 0%, transparent 60%),
    #fcf4dc;
  border: 1px solid rgba(189, 129, 54, 0.22);
  border-radius: 18px;
  box-shadow:
    0 16px 36px -22px rgba(94, 58, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sand-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff8e7;
  background: linear-gradient(135deg, #c98839 0%, #a3661f 100%);
  box-shadow:
    0 12px 24px -12px rgba(125, 75, 25, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(120, 65, 15, 0.45);
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.sand-button:hover { transform: translateY(-2px); filter: brightness(1.05); }
.sand-button:active { transform: translateY(1px); filter: brightness(0.95); }
.sand-button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.sand-button-ghost {
  background: rgba(255, 248, 231, 0.7);
  color: var(--sand-800);
  border: 1px solid rgba(189, 129, 54, 0.4);
  box-shadow: 0 6px 16px -10px rgba(125, 75, 25, 0.4);
}
.sand-button-ghost:hover { background: rgba(255, 248, 231, 0.95); }

/* ============== 角色色卡 ============== */

.role-tile {
  position: relative;
  border-radius: 24px;
  padding: 1.25rem 1.1rem 1.1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease;
}
.role-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.32), transparent 60%);
  pointer-events: none;
}
.role-tile:hover { transform: translateY(-4px); }

/* ============== 五阶段地层进度条 ============== */

.stage-strata {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.stage-stratum {
  position: relative;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(189, 129, 54, 0.25);
  background: linear-gradient(180deg, #f7e4bc 0%, #ddb46e 100%);
}
.stage-stratum:hover { transform: translateX(4px); }
.stage-stratum.completed {
  background: linear-gradient(180deg, #d3e4b9 0%, #6f9e62 100%);
  border-color: rgba(79, 138, 91, 0.4);
}
.stage-stratum.current {
  background: linear-gradient(180deg, #fff0c5 0%, #e6a23f 100%);
  border-color: rgba(189, 129, 54, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 205, 110, 0.5);
}
.stage-stratum.locked {
  background: linear-gradient(180deg, #ece1c8 0%, #c4ad84 100%);
  opacity: 0.65;
  cursor: not-allowed;
}

/* ============== 沙粒"流过"动画 ============== */

@keyframes sandFlow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}
.sand-flow {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 240, 200, 0.6) 50%, transparent 70%);
  animation: sandFlow 2.6s linear infinite;
  pointer-events: none;
}

/* ============== 对话气泡 ============== */

.chat-bubble {
  position: relative;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  line-height: 1.55;
  max-width: 92%;
  word-break: break-word;
  white-space: pre-wrap;
  font-size: 0.95rem;
}
.chat-bubble.student {
  align-self: flex-end;
  background: linear-gradient(135deg, #c98839 0%, #8d5520 100%);
  color: #fff8e7;
  border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
  align-self: flex-start;
  background: rgba(255, 248, 231, 0.95);
  color: var(--sand-900);
  border: 1px solid rgba(189, 129, 54, 0.25);
  border-bottom-left-radius: 4px;
}
.chat-bubble.ai p:first-child,
.chat-bubble.ai > div:first-child { margin-top: 0; }
.chat-bubble.ai p:last-child,
.chat-bubble.ai > div:last-child,
.chat-bubble.ai > ol:last-child,
.chat-bubble.ai > ul:last-child { margin-bottom: 0; }
.chat-bubble.ai code { font-family: 'Inter', monospace; }

/* 失败/降级的 AI 气泡 - 加视觉警示 */
.chat-bubble.ai.chat-bubble-failed {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.5), rgba(255, 248, 231, 0.95));
  border: 1px dashed rgba(168, 90, 50, 0.55);
}

/* 图片消息气泡 — 与文字气泡同源,但内容是图 */
.chat-bubble.chat-bubble-image {
  padding: 0.5rem;
  max-width: 96%;
  background: rgba(255, 248, 231, 0.95);
  border: 1px solid rgba(189, 129, 54, 0.25);
}
.chat-bubble.chat-bubble-image img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 10px;
  transition: transform 0.2s ease;
}
.chat-bubble.chat-bubble-image img:hover { transform: scale(1.01); }
.chat-bubble.chat-bubble-image .image-caption {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--sand-700);
  font-style: italic;
  max-width: 460px;
  line-height: 1.4;
}

/* 生图中占位 */
.chat-bubble.chat-bubble-image-loading {
  background: linear-gradient(135deg, rgba(255, 245, 220, 0.95), rgba(243, 217, 154, 0.5));
  border: 1px dashed rgba(189, 129, 54, 0.5);
  color: var(--sand-800);
  font-size: 0.88rem;
}
.chat-bubble.chat-bubble-image-loading .image-caption {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--sand-700);
  font-style: italic;
}
.chat-bubble.system {
  align-self: center;
  background: rgba(189, 129, 54, 0.12);
  color: var(--sand-800);
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand-700);
  opacity: 0.5;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ============== 沙瓶 (Growth Portfolio) ============== */

.sand-jar {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: 24px 24px 60px 60px / 24px 24px 30px 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 30%),
    linear-gradient(180deg, transparent 0%, rgba(123,77,34,0.08) 100%);
  border: 2px solid rgba(189, 129, 54, 0.3);
  overflow: hidden;
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.35),
    inset 0 -10px 20px rgba(94, 58, 23, 0.18),
    0 18px 36px -18px rgba(94, 58, 23, 0.4);
}
.sand-jar-layer {
  position: absolute;
  left: 0;
  right: 0;
  transition: height 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ============== 滚动条美化 ============== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(189, 129, 54, 0.35);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(189, 129, 54, 0.55); }

/* ============== 进度环 ============== */

.progress-ring { transform: rotate(-90deg); }
.progress-ring circle { transition: stroke-dashoffset 0.6s ease; }

/* ============== 入场动画 ============== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-stagger > * { animation: fadeUp 0.5s ease both; }
.fade-up-stagger > *:nth-child(1) { animation-delay: 0.02s; }
.fade-up-stagger > *:nth-child(2) { animation-delay: 0.08s; }
.fade-up-stagger > *:nth-child(3) { animation-delay: 0.14s; }
.fade-up-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.fade-up-stagger > *:nth-child(5) { animation-delay: 0.26s; }
.fade-up-stagger > *:nth-child(6) { animation-delay: 0.32s; }
.fade-up-stagger > *:nth-child(7) { animation-delay: 0.38s; }
.fade-up-stagger > *:nth-child(8) { animation-delay: 0.44s; }
.fade-up-stagger > *:nth-child(9) { animation-delay: 0.5s; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 110, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 205, 110, 0); }
}
.pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* ============== 沙盘地图 ============== */

.map-board {
  position: relative;
  border-radius: 28px;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 30%, #f7e1ae 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, #e0b673 0%, transparent 40%),
    radial-gradient(circle at 60% 20%, #f0cd8a 0%, transparent 30%),
    linear-gradient(135deg, #f5dfaf 0%, #d9b06a 100%);
  border: 1px solid rgba(123, 77, 34, 0.25);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -4px 8px rgba(94, 58, 23, 0.15),
    0 24px 48px -24px rgba(94, 58, 23, 0.45);
  overflow: hidden;
}
.map-board::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(-45deg, rgba(94,58,23,0.03) 0 2px, transparent 2px 8px);
  pointer-events: none;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.map-pin:hover { transform: translate(-50%, -55%) scale(1.06); z-index: 5; }
.map-pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcd6a, #a3661f);
  border: 2px solid #fff8e7;
  box-shadow: 0 4px 10px rgba(94, 58, 23, 0.45);
}

/* ============== 上传区 ============== */

.upload-zone {
  border: 2px dashed rgba(189, 129, 54, 0.5);
  background: rgba(255, 248, 231, 0.6);
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.upload-zone:hover {
  background: rgba(255, 248, 231, 0.9);
  border-color: rgba(189, 129, 54, 0.8);
}
.upload-zone.dragover {
  background: rgba(255, 232, 188, 0.95);
  border-color: var(--sand-600);
}

/* ============== 评分星 ============== */

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(189, 129, 54, 0.15);
  color: var(--sand-800);
}
.score-pill.ai { background: rgba(105, 144, 199, 0.18); color: #2c4665; }
.score-pill.teacher { background: rgba(79, 138, 91, 0.2); color: #2c5a36; }

/* ============== 媒体缩略 ============== */

.media-thumb {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(189, 129, 54, 0.25);
  background: rgba(255, 248, 231, 0.6);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.media-thumb:hover { transform: scale(1.03); }
.media-thumb img, .media-thumb video {
  width: 100%; height: 100%; object-fit: cover;
}

/* ============== 模态层 ============== */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(60, 32, 8, 0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeUp 0.25s ease both;
}

/* ============== 响应式 (平板优先) ============== */

@media (max-width: 768px) {
  .chat-bubble { max-width: 96%; }
  .map-board { padding: 1rem; }
}

/* 隐藏滚动条 (横向卷轴) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* 文字阴影 (沙盘地图大标题) */
.title-shadow {
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(94, 58, 23, 0.3);
}

/* 角色徽章 ring 动效 */
@keyframes ringFloat {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}
.ring-float { animation: ringFloat 5s ease-in-out infinite; }

/* 按钮 chip */
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(189, 129, 54, 0.14);
  color: var(--sand-800);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(189, 129, 54, 0.22);
}
.chip.green { background: rgba(79, 138, 91, 0.16); color: #2c5a36; border-color: rgba(79, 138, 91, 0.3); }
.chip.blue  { background: rgba(105, 144, 199, 0.18); color: #2c4665; border-color: rgba(105, 144, 199, 0.32); }
.chip.terra { background: rgba(168, 90, 50, 0.18); color: var(--terra); border-color: rgba(168, 90, 50, 0.32); }
.chip.gold  { background: rgba(212, 159, 58, 0.2);  color: #7a5418; border-color: rgba(212, 159, 58, 0.36); }

/* 表格 */
.sand-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.sand-table th, .sand-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(189, 129, 54, 0.18);
  font-size: 0.92rem;
}
.sand-table thead th {
  background: rgba(189, 129, 54, 0.1);
  color: var(--sand-800);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.sand-table tbody tr:hover { background: rgba(255, 248, 231, 0.6); }

/* 标签页 */
.tabs { display: inline-flex; gap: 4px; background: rgba(189, 129, 54, 0.12); padding: 4px; border-radius: 14px; }
.tabs button {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: transparent;
  color: var(--sand-800);
  font-weight: 500;
  font-size: 0.9rem;
  border: none; cursor: pointer;
  transition: all 0.2s ease;
}
.tabs button.active {
  background: linear-gradient(135deg, #fff5dc, #f3d99a);
  color: var(--sand-900);
  box-shadow: 0 4px 12px -6px rgba(94, 58, 23, 0.45);
}

/* 评分滑块 */
.range-sand {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f4e9d2, #cf9d52);
  outline: none;
}
.range-sand::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd98a, #a3661f);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(94, 58, 23, 0.45);
  border: 2px solid #fff8e7;
}

/* 隔离层渐变 */
.divider-sand {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(189, 129, 54, 0.45), transparent);
  margin: 1rem 0;
}

/* 网页成果展轮播卡 */
.showcase-card {
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff5dc, #f0d49a);
  border: 1px solid rgba(189, 129, 54, 0.3);
  box-shadow: 0 18px 36px -22px rgba(94, 58, 23, 0.5);
  transition: transform 0.3s ease;
}
.showcase-card:hover { transform: translateY(-6px); }

/* 印章效果 */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--terra);
  color: var(--terra);
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 0.95rem;
  border-radius: 8px;
  transform: rotate(-4deg);
  letter-spacing: 0.18em;
  background: rgba(255, 248, 231, 0.6);
  font-weight: 700;
}

/* 内容区最大宽度 */
.content-max { max-width: 1280px; margin: 0 auto; }

/* ============== 八大武器 ============== */
.weapon-icon {
  display: block;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.25s ease;
  filter: drop-shadow(0 4px 8px rgba(94, 58, 23, 0.25));
}
.weapon-card:hover .weapon-icon {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 8px 16px rgba(94, 58, 23, 0.35));
}
.weapon-icon.equipped {
  filter: drop-shadow(0 6px 16px rgba(255, 205, 110, 0.65));
}

.weapon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  background: rgba(255, 248, 231, 0.5);
  border: 1.5px solid rgba(189, 129, 54, 0.18);
  text-align: center;
  overflow: hidden;
}
.weapon-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 248, 231, 0.85);
  border-color: rgba(189, 129, 54, 0.45);
  box-shadow: 0 14px 28px -18px rgba(94, 58, 23, 0.45);
}
.weapon-card.equipped {
  background: linear-gradient(160deg, #fff5dc, #f3d99a);
  border-color: rgba(189, 129, 54, 0.65);
  box-shadow:
    0 0 0 2px rgba(255, 205, 110, 0.45),
    0 18px 32px -16px rgba(94, 58, 23, 0.55);
}
.weapon-card .weapon-name {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 0.95rem;
  color: var(--sand-900);
  margin-top: 6px;
  line-height: 1.1;
}
.weapon-card .weapon-tagline {
  font-size: 0.7rem;
  color: var(--sand-700);
  margin-top: 2px;
  line-height: 1.2;
}
.weapon-card .equipped-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg,#ffd98a,#a3661f);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* 装备的武器状态条 */
.equipped-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 217, 138, 0.4), rgba(189, 129, 54, 0.2));
  border: 1px solid rgba(189, 129, 54, 0.4);
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  color: var(--sand-900);
}

/* ============== 角色形象动画 ============== */
.role-character {
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.agent-card:hover .role-character {
  transform: translateY(-6px) scale(1.03);
}
.agent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1.1rem;
  border-radius: 26px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  background: rgba(255, 248, 231, 0.6);
  border: 1px solid rgba(189, 129, 54, 0.22);
  box-shadow: 0 14px 30px -18px rgba(94, 58, 23, 0.4);
  overflow: hidden;
}
.agent-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.45), transparent 60%);
  pointer-events: none;
}
.agent-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -22px rgba(94, 58, 23, 0.55);
}
.agent-card .agent-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 235, 175, 0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.agent-card:hover .agent-glow {
  opacity: 1;
}

/* ============== 庆祝动画 ============== */
.celebrate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(255, 230, 165, 0.92) 0%, rgba(189, 129, 54, 0.85) 60%, rgba(94, 58, 23, 0.92) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeUp 0.5s ease both;
  overflow: hidden;
}
.celebrate-overlay::before, .celebrate-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.celebrate-emoji {
  font-size: 9rem;
  filter: drop-shadow(0 12px 30px rgba(94,58,23,0.55));
  animation: celebrateBounce 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes celebrateBounce {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.celebrate-title {
  font-family: 'ZCOOL XiaoWei', serif;
  color: #fff8e7;
  font-size: 3.2rem;
  margin-top: 1rem;
  letter-spacing: 0.15em;
  text-shadow: 0 4px 24px rgba(94,58,23,0.6);
  animation: fadeUp 0.7s 0.2s ease both;
}
.celebrate-sub {
  color: #fff8e7e6;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  animation: fadeUp 0.7s 0.35s ease both;
}
.celebrate-tip {
  margin-top: 1.5rem;
  color: #fff8e7c0;
  font-size: 0.85rem;
  animation: fadeUp 0.7s 0.55s ease both;
}

/* 沙粒下落庆祝 */
.confetti-sand {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti-sand span {
  position: absolute;
  top: -8%;
  border-radius: 50%;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(120vh) rotate(360deg); opacity: 0; }
}

