/* ===== CSS Variables - 温馨治愈系配色 ===== */
:root {
  /* 背景色系（温暖深色） */
  --bg-primary: #1a1512;
  --bg-secondary: #251e1a;
  --bg-tertiary: #2d2520;
  --bg-elevated: #352b25;

  /* 主题色（琥珀金） */
  --color-primary: #e8a54b;
  --color-primary-light: #f4c472;
  --color-primary-dark: #c4873a;

  /* 强调色（玫瑰金） */
  --color-accent: #d4a574;
  --color-accent-light: #e8c4a0;

  /* 火焰色 */
  --flame-core: #fff8e7;
  --flame-inner: #ffd93d;
  --flame-mid: #ff9f43;
  --flame-outer: #ff6b35;

  /* 文字层级 */
  --text-primary: #f5ebe0;
  --text-secondary: #c9b8a8;
  --text-tertiary: #8a7d71;
  --text-inverse: #1a1512;

  /* 卡片系统 */
  --card-bg: linear-gradient(160deg, #2d2520 0%, #251e1a 50%, #1f1a16 100%);
  --card-border: rgba(232, 165, 75, 0.25);

  /* 光晕效果 */
  --glow-soft: rgba(255, 159, 67, 0.15);
  --glow-medium: rgba(255, 159, 67, 0.3);
  --glow-strong: rgba(255, 159, 67, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 页面加载动画 ===== */
body {
  background: #0a0a0e;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-image 3s ease;
}

body.show-content {
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 50% 0%, #2d2520 0%, #1a1512 70%),
    radial-gradient(ellipse at 50% 30%, rgba(232, 165, 75, 0.03) 0%, transparent 60%);
  opacity: 0;
  animation: pageLoad 0.6s ease-out 0.1s forwards;
}

body.intro-done {
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 50% 0%, #2d2520 0%, #1a1512 70%),
    radial-gradient(ellipse at 50% 30%, rgba(232, 165, 75, 0.03) 0%, transparent 60%);
}

/* 点亮后背景变亮 */
body.lit {
  background-image:
    radial-gradient(ellipse at 50% 0%, #3d3228 0%, #221e18 70%),
    radial-gradient(ellipse at 50% 30%, rgba(232, 165, 75, 0.06) 0%, transparent 60%);
}

@keyframes pageLoad {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* 温暖背景光晕 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(232, 165, 75, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 30% 70%, rgba(212, 165, 116, 0.02) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

body:not(.show-content):not(.intro-done)::before {
  content: none;
}

/* ===== 漂浮光点粒子 ===== */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
}

body.show-content .particles-container {
  opacity: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, rgba(232, 165, 75, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatUp 15s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 18s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 16s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; animation-duration: 20s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; animation-duration: 17s; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; animation-duration: 15s; }

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(100vh) scale(0.5); }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* ===== 顶部公告栏 ===== */
.announcement-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  background: rgba(26, 21, 18, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text-inverse);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}

.announcement-bar.hidden {
  display: none;
}

.announcement-text {
  display: inline-block;
  animation: scrollAnnouncement 25s linear infinite;
  padding-left: 100%;
  font-size: 14px;
}

@keyframes scrollAnnouncement {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== 地图区域 ===== */
#map {
  width: 100%;
  height: 45vh;
  min-height: 280px;
  background: var(--bg-secondary);
  z-index: 1;
  position: relative;
  opacity: 0;
}

body.show-content #map {
  animation: fadeIn 0.8s ease-out 0.7s forwards;
}

/* 地图底部渐变遮罩 - 更小更透明 */
#map::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(180deg, transparent 0%, rgba(26, 21, 18, 0.7) 100%);
  pointer-events: none;
  z-index: 1000;
}

.leaflet-container {
  background: var(--bg-secondary);
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ===== 主容器 ===== */
.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ===== 标题区域 ===== */
.title-section {
  margin-bottom: 20px;
  opacity: 0;
}

body.show-content .title-section {
  animation: slideUp 0.7s ease-out 0.3s forwards;
}

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

.title {
  font-size: 28px;
  margin: 10px 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-tertiary);
}

/* ===== 统一和平卡片 ===== */
.peace-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  margin: 32px auto;
  max-width: 520px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  position: relative;
  opacity: 0;
}

body.show-content .peace-card {
  animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

/* 卡片顶部光晕 */
.peace-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(232, 165, 75, 0.05) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 24px 24px 0 0;
}

/* 卡片内边框 */
.peace-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid rgba(232, 165, 75, 0.15);
  border-radius: 25px;
  pointer-events: none;
}

@keyframes cardEntrance {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 区块通用样式 ===== */
.peace-card__stats {
  padding: 36px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.peace-card__candle {
  padding: 0 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.peace-card__honor {
  padding: 16px 28px 28px;
  position: relative;
  z-index: 1;
}

/* ===== 分隔线 ===== */
.peace-card__divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232, 165, 75, 0.2) 20%,
    rgba(232, 165, 75, 0.4) 50%,
    rgba(232, 165, 75, 0.2) 80%,
    transparent 100%
  );
  margin: 16px 0;
  position: relative;
}

/* 分隔线中心装饰点 */
.peace-card__divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--glow-medium);
}

/* ===== 统计数据 ===== */
.stats-container {
  margin: 0;
  text-align: center;
}

.counter-wrapper {
  display: inline-block;
  padding: 18px 36px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(232, 165, 75, 0.15);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.counter-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  pointer-events: none;
}

.counter-label-row {
  margin-bottom: 16px;
}

.counter-label {
  display: inline;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 500;
}

.counter-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-tertiary);
  color: var(--text-tertiary);
  background: transparent;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
  transition: all 0.2s;
}
.counter-info-btn:hover {
  border-color: #ffb347;
  color: #ffb347;
}

.btn-small {
  padding: 10px 24px;
  font-size: 14px;
  width: auto;
  margin: 16px auto 0;
}

.rolling-counter {
  display: inline-flex;
  gap: 4px;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.counter-digit {
  width: 36px;
  height: 48px;
  background: linear-gradient(180deg,
    #2d2520 0%,
    #251e1a 45%,
    #1f1a16 55%,
    #251e1a 100%
  );
  border: 1px solid rgba(232, 165, 75, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.counter-digit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.counter-digit.rolling {
  animation: digitRoll 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes digitRoll {
  0% { transform: translateY(-40%); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 1; }
}

.counter-separator {
  width: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0.7;
}

/* ===== 蜡烛按钮区域 ===== */
.candle-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 0;
}

.candle-container {
  width: 100px;
  height: 100px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.candle-container:hover {
  transform: scale(1.08);
}

/* ===== 点亮 Loading 圆环 ===== */
.candle-container.loading {
  cursor: wait;
}

.candle-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin-top: -70px;
  margin-left: -70px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 60%,
    rgba(232, 165, 75, 0.8) 80%,
    rgba(255, 217, 61, 0.9) 90%,
    transparent 100%
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent 56%,
    black 57%,
    black 100%
  );
  mask: radial-gradient(
    circle,
    transparent 56%,
    black 57%,
    black 100%
  );
  animation: candleSpinner 1.2s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes candleSpinner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 背景音乐按钮 ===== */

.music-toggle {
  position: absolute;
  left: 12px;
  top: -36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 165, 75, 0.4);
  background: rgba(26, 21, 18, 0.6);
  color: #e8a54b;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: none;
}

.music-toggle:hover {
  background: rgba(232, 165, 75, 0.15);
  border-color: rgba(232, 165, 75, 0.7);
}

.music-toggle.playing .music-icon {
  display: inline-block;
  animation: musicSpin 4s linear infinite;
}

.music-toggle:not(.playing) {
  opacity: 0.5;
}

.music-toggle:not(.playing)::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1.5px;
  background: rgba(232, 165, 75, 0.6);
  transform: rotate(-45deg);
}

@keyframes musicSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 分享浮动按钮 ===== */

.fab-btn {
  position: absolute;
  left: 12px;
  top: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 165, 75, 0.4);
  background: rgba(26, 21, 18, 0.6);
  color: #e8a54b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}

.fab-btn:hover {
  background: rgba(232, 165, 75, 0.15);
  border-color: rgba(232, 165, 75, 0.7);
}

.fab-btn:active {
  transform: scale(0.92);
}

/* 分享按钮角标 */
.fab-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e8a54b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 1.5px solid #0a0a0a;
  box-sizing: border-box;
  animation: badgePop 0.25s ease-out;
}

.fab-badge.hidden {
  display: none;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ===== 蜡烛交互系统 ===== */

/* 1. 飞出的和平文字 — 3D 由远及近效果 */
.peace-text-fly {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.3);
  color: #e8a54b;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  text-shadow: 0 0 8px rgba(232, 165, 75, 0.5);
  animation: peaceText3D 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes peaceText3D {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    filter: blur(2px);
  }
  10% {
    opacity: 1;
    filter: blur(0);
  }
  30% {
    transform: translate(-50%, -50%) scale(0.8) translateX(calc(var(--fly-x) * 0.19)) translateY(calc(var(--fly-y) * 0.19));
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.8) translateX(calc(var(--fly-x) * 0.5)) translateY(calc(var(--fly-y) * 0.5));
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5) translateX(var(--fly-x)) translateY(var(--fly-y));
    opacity: 0;
    filter: blur(1px);
  }
}

/* 2. 心灵感应文字 — 蜡烛右侧，歌词式淡入淡出 */
.telepathy-bubble {
  position: absolute;
  top: 8px;
  left: calc(50% + 58px);
  max-width: min(320px, calc(50% - 74px));
  color: rgba(232, 196, 160, 0.9);
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 0 10px rgba(232, 165, 75, 0.25);
  animation: lyricIn 0.4s ease-out forwards, lyricOut 0.5s ease-in 2s forwards;
}

/* 3. 会说话的蜡烛文字 — 蜡烛右侧，歌词式淡入淡出 */
.talking-bubble {
  position: absolute;
  top: 12px;
  left: calc(50% + 58px);
  max-width: min(320px, calc(50% - 74px));
  color: rgba(232, 196, 160, 0.85);
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 0 10px rgba(232, 165, 75, 0.2);
  animation: lyricIn 0.6s ease-out forwards;
}

.talking-bubble.hiding {
  animation: lyricOut 0.6s ease-in forwards;
}

@keyframes lyricIn {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes lyricOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* 蜡烛环境光晕 */
.candle-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(255, 159, 67, 0.15) 0%,
    rgba(255, 159, 67, 0.05) 30%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.candle-glow.active {
  opacity: 1;
  animation: glowBreath 4s ease-in-out infinite;
}

/* 点燃仪式期间：环境光晕从无到有 */
.candle-glow.lighting-glow {
  animation: candleGlowLighting 3s ease-out forwards;
}

@keyframes candleGlowLighting {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  50%  { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes glowBreath {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* 蜡烛主体 */
.candle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 火焰和烛芯容器 */
.flame-wick-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 0;
}

.candle-body {
  width: 48px;
  height: 85px;
  background: linear-gradient(90deg,
    #f5e6d3 0%,
    #fffaf5 35%,
    #f8ede0 50%,
    #e8d5c4 100%
  );
  border-radius: 6px 6px 10px 10px;
  position: relative;
  box-shadow:
    inset -6px 0 15px rgba(0, 0, 0, 0.08),
    inset 3px 0 8px rgba(255, 255, 255, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 蜡烛光泽 */
.candle-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 30%),
    radial-gradient(ellipse at 50% 5%, rgba(255,255,255,0.2) 0%, transparent 50%);
  border-radius: inherit;
}

/* 蜡烛芯 */
.candle-wick {
  width: 3px;
  height: 10px;
  background: #2a2a2a;
  border-radius: 1px;
  position: relative;
}

/* 蜡烛底座 */
.candle-base {
  width: 58px;
  height: 10px;
  background: linear-gradient(180deg, #d4a574 0%, #b08050 50%, #8a6540 100%);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* 蜡泪 */
.candle-drip {
  position: absolute;
  background: linear-gradient(180deg, #fff8f0 0%, #f0e4d4 100%);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 1px 0 3px rgba(0,0,0,0.05);
}

.candle-drip:nth-child(1) {
  width: 6px;
  height: 18px;
  left: 5px;
  top: 10px;
}

.candle-drip:nth-child(2) {
  width: 5px;
  height: 12px;
  right: 7px;
  top: 20px;
}

.candle-drip:nth-child(3) {
  width: 4px;
  height: 8px;
  left: 15px;
  top: 25px;
}

/* ===== 火焰动画 - 温馨治愈系 ===== */
.candle-flame {
  width: 18px;
  height: 28px;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  opacity: 0;
  transform-origin: center bottom;
  filter: blur(0.5px);
}

.candle-flame.lit {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: flameGentle 3s ease-in-out infinite;
}

/* 点燃仪式动画 */
.candle-flame.lighting {
  animation: lightingCeremony 3s ease-out forwards;
}

@keyframes lightingCeremony {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0) translateY(10px);
    filter: brightness(2) blur(4px);
  }
  15% {
    opacity: 0.4;
    transform: translateX(-50%) scale(0.2) translateY(6px);
    filter: brightness(1.8) blur(3px);
  }
  40% {
    opacity: 0.8;
    transform: translateX(-50%) scale(0.7) translateY(2px);
    filter: brightness(1.4) blur(1.5px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) scale(1.15) translateY(0);
    filter: brightness(1.2) blur(0.5px);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05) translateY(0);
    filter: brightness(1.05) blur(0.5px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
    filter: brightness(1) blur(0.5px);
  }
}

/* 说话前奏：快速摆动+明亮 */
@keyframes flameSpeakingIntro {
  0%   { transform: translateX(-50%) rotate(-2deg); filter: brightness(1) blur(0.5px); }
  15%  { transform: translateX(-50%) rotate(6deg);  filter: brightness(1.8) blur(0px); }
  30%  { transform: translateX(-50%) rotate(-5deg); filter: brightness(1.7) blur(0px); }
  50%  { transform: translateX(-50%) rotate(5deg);  filter: brightness(1.6) blur(0.1px); }
  65%  { transform: translateX(-50%) rotate(-4deg); filter: brightness(1.5) blur(0.1px); }
  80%  { transform: translateX(-50%) rotate(3deg);  filter: brightness(1.35) blur(0.2px); }
  100% { transform: translateX(-50%) rotate(-1.5deg); filter: brightness(1.25) blur(0.3px); }
}

/* 说话中：缓慢摆动+柔亮 */
@keyframes flameSpeaking {
  0%, 100% { transform: translateX(-50%) rotate(-1.5deg); filter: brightness(1.15) blur(0.3px); }
  50%      { transform: translateX(-50%) rotate(2deg); filter: brightness(1.3) blur(0.2px); }
}

/* 说话中 glow 伴随 */
@keyframes flameGlowSpeaking {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.15); }
  50%      { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
}

.candle-flame.flame-speaking-intro {
  animation: flameSpeakingIntro 0.6s ease-out forwards;
}
.candle-flame.flame-speaking-intro::after {
  animation: flameGlowSpeaking 0.3s ease-out forwards;
}

.candle-flame.flame-speaking {
  animation: flameSpeaking 1.2s ease-in-out infinite;
}
.candle-flame.flame-speaking::after {
  animation: flameGlowSpeaking 1.2s ease-in-out infinite alternate;
}

.candle-flame::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: radial-gradient(ellipse at bottom center,
    var(--flame-core) 0%,
    var(--flame-inner) 20%,
    var(--flame-mid) 50%,
    var(--flame-outer) 75%,
    transparent 90%
  );
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.candle-flame::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 200, 100, 0.5) 0%,
    rgba(255, 159, 67, 0.25) 35%,
    transparent 70%
  );
  animation: flameGlow 2s ease-in-out infinite alternate;
}

/* 点燃仪式期间：光晕从无到强 */
.candle-flame.lighting::after {
  animation: lightingFlameGlow 3s ease-out forwards;
}

@keyframes lightingFlameGlow {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  30%  { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
  70%  { opacity: 0.9; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes flameGentle {
  0%, 100% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
    filter: brightness(1) blur(0.5px);
  }
  25% {
    transform: translateX(-50%) scale(1.02) rotate(0deg);
  }
  50% {
    transform: translateX(-50%) scale(1.05) rotate(2deg);
    filter: brightness(1.1) blur(0.3px);
  }
  75% {
    transform: translateX(-50%) scale(1.02) rotate(-1deg);
  }
}

@keyframes flameShake {
  0%, 100% { transform: translateX(-50%) scale(1); }
  10% { transform: translateX(-50%) scale(1.08) rotate(-4deg); }
  20% { transform: translateX(-50%) scale(1.12) rotate(4deg); }
  30% { transform: translateX(-50%) scale(1.09) rotate(-3deg); }
  40% { transform: translateX(-50%) scale(1.06) rotate(2deg); }
  60% { transform: translateX(-50%) scale(1.02) rotate(-1deg); }
}

.candle-flame.shake {
  animation: flameShake 0.4s ease-out !important;
}

@keyframes flameGlow {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== 计数器发光效果 ===== */
.counter-wrapper.glow {
  animation: counterCelebrate 3s ease-out forwards;
}

@keyframes counterCelebrate {
  0% {
    box-shadow: 0 0 0 rgba(232, 165, 75, 0);
    border-color: rgba(232, 165, 75, 0.15);
  }
  15% {
    box-shadow:
      0 0 30px rgba(232, 165, 75, 0.6),
      0 0 60px rgba(232, 165, 75, 0.3);
    border-color: rgba(232, 165, 75, 0.5);
  }
  40% {
    box-shadow:
      0 0 25px rgba(232, 165, 75, 0.5),
      0 0 50px rgba(232, 165, 75, 0.25);
    border-color: rgba(232, 165, 75, 0.4);
  }
  100% {
    box-shadow: 0 0 0 rgba(232, 165, 75, 0);
    border-color: rgba(232, 165, 75, 0.15);
  }
}

/* ===== 通行证 ===== */
.certificate {
  position: relative;
  background:
    linear-gradient(135deg, rgba(232, 165, 75, 0.04) 0%, rgba(232, 165, 75, 0.01) 100%),
    linear-gradient(160deg, #2d2520 0%, #251e1a 50%, #1f1a16 100%);
  border: 1.5px solid rgba(232, 165, 75, 0.3);
  border-radius: 8px;
  padding: 24px 20px 16px;
  text-align: center;
  animation: certReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes certReveal {
  0% { opacity: 0; transform: translateY(15px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 装饰角标 */
.certificate-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(232, 165, 75, 0.4);
  border-style: solid;
}
.certificate-corner-tl { top: 5px; left: 5px; border-width: 1.5px 0 0 1.5px; border-radius: 2px 0 0 0; }
.certificate-corner-tr { top: 5px; right: 5px; border-width: 1.5px 1.5px 0 0; border-radius: 0 2px 0 0; }
.certificate-corner-bl { bottom: 5px; left: 5px; border-width: 0 0 1.5px 1.5px; border-radius: 0 0 0 2px; }
.certificate-corner-br { bottom: 5px; right: 5px; border-width: 0 1.5px 1.5px 0; border-radius: 0 0 2px 0; }

/* 称谓行（左对齐，独立行，可点击打开管理菜单） */
.cert-greeting {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: 8px;
  opacity: 0;
  animation: certLineFadeIn 1s ease-out forwards;
  cursor: pointer;
  display: flex;
  align-items: stretch;
  transition: all 0.2s ease;
  background: rgba(232, 165, 75, 0.06);
  border: 1px solid rgba(232, 165, 75, 0.15);
  border-radius: 8px;
  width: fit-content;
  margin-left: -1px;
  overflow: hidden;
}

.cert-greeting:hover {
  background: rgba(232, 165, 75, 0.12);
  border-color: rgba(232, 165, 75, 0.3);
  color: var(--color-primary);
}

.cert-greeting-name {
  padding: 6px 10px;
  display: flex;
  align-items: center;
}

.cert-greeting-divider {
  width: 1px;
  background: rgba(232, 165, 75, 0.2);
  align-self: stretch;
  margin: 4px 0;
}

.cert-greeting:hover .cert-greeting-divider {
  background: rgba(232, 165, 75, 0.35);
}

.cert-greeting-arrow {
  font-size: 10px;
  opacity: 0.4;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.cert-greeting:hover .cert-greeting-arrow {
  opacity: 0.8;
}

.cert-line {
  margin-bottom: 8px;
  opacity: 0;
  animation: certLineFadeIn 1.5s ease-out forwards;
}

@keyframes certLineFadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.certificate-body .cert-line:nth-child(1) { animation-delay: 0.3s; }
.certificate-body .cert-line:nth-child(2) { animation-delay: 0.6s; }
.certificate-body .cert-line:nth-child(3) { animation-delay: 0.9s; }
.certificate-body .cert-line:nth-child(4) { animation-delay: 1.2s; }
.certificate-body .cert-line:nth-child(5) { animation-delay: 1.5s; }

.cert-opening {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  font-style: italic;
}

.cert-main {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 10px;
}

.cert-highlight-rank {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-shadow: 0 0 15px rgba(232, 165, 75, 0.3);
}

.cert-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 6px;
}

.cert-location {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 10px;
}

.cert-highlight-loc {
  font-weight: 600;
  color: var(--color-primary-light);
  text-shadow: 0 0 10px rgba(232, 165, 75, 0.2);
}

.cert-inspire {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.7;
  font-style: italic;
  margin-top: 8px;
}

/* 落款（右对齐） */
.cert-footer {
  text-align: right;
  margin-top: 10px;
}

.cert-footer .cert-line {
  margin-bottom: 2px;
  animation: none;
  opacity: 1;
}

.cert-date {
  font-size: 10px;
  color: var(--text-tertiary);
}

.cert-watermark {
  font-size: 9px;
  color: rgba(232, 165, 75, 0.25);
  letter-spacing: 2px;
}

/* 二维码+说明并排区域 */
.cert-qr-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 165, 75, 0.12);
  animation: certQRFadeIn 0.8s ease-out;
}

@keyframes certQRFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.cert-qr-image {
  flex-shrink: 0;
}

.cert-qr-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.cert-qr-image canvas {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  transition: opacity 0.4s ease;
}

/* QR 二维码金光闪烁 */
@keyframes qrGoldenFlash {
  0% { box-shadow: 0 0 0 rgba(232, 165, 75, 0); }
  30% { box-shadow: 0 0 20px rgba(232, 165, 75, 0.5), 0 0 40px rgba(232, 165, 75, 0.25); }
  100% { box-shadow: 0 0 0 rgba(232, 165, 75, 0); }
}

.cert-qr-image.golden-flash canvas {
  border-radius: 4px;
}

.cert-qr-image.golden-flash {
  animation: qrGoldenFlash 1.5s ease-out;
  border-radius: 4px;
}

.cert-qr-guide {
  flex: 1;
  min-width: 0;
}

.qr-guide-item {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-bottom: 4px;
}

/* 通行证更新闪光 */
@keyframes certUpdateGlow {
  0% { box-shadow: inset 0 0 0 rgba(232, 165, 75, 0); }
  50% { box-shadow: inset 0 0 30px rgba(232, 165, 75, 0.15); }
  100% { box-shadow: inset 0 0 0 rgba(232, 165, 75, 0); }
}

.certificate.updating {
  animation: certUpdateGlow 1.5s ease-in-out;
}

/* ===== 通行证文字发光动画 ===== */
.certificate-body.text-glow .cert-line {
  animation: certLineGlow 3s ease-out forwards !important;
}

@keyframes certLineGlow {
  0%   { text-shadow: 0 0 0 rgba(232, 165, 75, 0); }
  20%  { text-shadow: 0 0 10px rgba(232, 165, 75, 0.4), 0 0 20px rgba(232, 165, 75, 0.2); }
  50%  { text-shadow: 0 0 15px rgba(232, 165, 75, 0.5), 0 0 30px rgba(232, 165, 75, 0.25); }
  100% { text-shadow: 0 0 0 rgba(232, 165, 75, 0); }
}

/* ===== QR 码首次展示发光 ===== */
.cert-qr-section.qr-initial-glow .cert-qr-image canvas {
  animation: qrInitialGlow 2.5s ease-out forwards;
}

@keyframes qrInitialGlow {
  0%   { box-shadow: 0 0 0 rgba(232, 165, 75, 0); }
  25%  { box-shadow: 0 0 15px rgba(232, 165, 75, 0.5), 0 0 30px rgba(232, 165, 75, 0.25), 0 0 45px rgba(232, 165, 75, 0.1); }
  100% { box-shadow: 0 0 0 rgba(232, 165, 75, 0); }
}

/* ===== 设置按钮呼吸闪烁 ===== */
#certGreeting.breathing-pulse {
  animation: settingsBreath 1.5s ease-in-out infinite;
}

@keyframes settingsBreath {
  0%, 100% { text-shadow: 0 0 0 rgba(232, 165, 75, 0); }
  50%      { text-shadow: 0 0 12px rgba(232, 165, 75, 0.4), 0 0 24px rgba(232, 165, 75, 0.2); }
}

/* ===== 设置按钮气泡提示 ===== */
.settings-tooltip-bubble {
  position: absolute;
  background: rgba(45, 37, 32, 0.95);
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 10px;
  padding: 8px 14px 8px 14px;
  color: #f4c472;
  font-size: 12px;
  line-height: 1.4;
  min-width: 140px;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
  pointer-events: auto;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: tooltipIn 0.4s ease-out forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-tooltip-bubble::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(45, 37, 32, 0.95);
  border-left: 1px solid rgba(232, 165, 75, 0.3);
  border-top: 1px solid rgba(232, 165, 75, 0.3);
}

.settings-tooltip-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(232, 165, 75, 0.15);
  color: #f4c472;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.settings-tooltip-close:hover {
  background: rgba(232, 165, 75, 0.3);
}

.settings-tooltip-bubble.fading {
  animation: tooltipOut 0.5s ease-in forwards;
}

@keyframes tooltipIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.95); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes tooltipOut {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(0.95); }
}

/* ===== 通行证操作按钮 ===== */
.cert-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cert-actions .action-btn {
  background: rgba(232, 165, 75, 0.08);
  border: 1px solid rgba(232, 165, 75, 0.25);
  border-radius: 24px;
  padding: 7px 14px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.cert-actions .action-btn:hover {
  background: rgba(232, 165, 75, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cert-actions .action-btn:active {
  transform: scale(0.95);
}

.btn-icon { font-size: 14px; }
.btn-text { font-weight: 500; }
.toggle-icon { font-size: 10px; transition: transform 0.3s ease; }
.donate-toggle.expanded .toggle-icon { transform: rotate(180deg); }

/* ===== 用户菜单下拉 ===== */
.user-dropdown {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid rgba(232, 165, 75, 0.25);
  border-radius: 12px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: dropdownSlideUp 0.2s ease-out;
  z-index: 9999;
}

@keyframes dropdownSlideUp {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(232, 165, 75, 0.1);
  color: var(--text-primary);
}

.dropdown-item-danger {
  color: #e57373;
}

.dropdown-item-danger:hover {
  background: rgba(229, 115, 115, 0.1);
  color: #ef5350;
}

.dropdown-divider {
  height: 1px;
  background: rgba(232, 165, 75, 0.15);
  margin: 4px 0;
}

.dropdown-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

/* ===== 登录区域 ===== */
.scan-login-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0 10px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  animation: fadeIn 0.5s ease-out;
}

/* 操作按钮 */
.scan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.scan-action-btn {
  padding: 10px 16px;
  border: 1px solid rgba(232, 165, 75, 0.25);
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 220px;
}

.scan-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(232, 165, 75, 0.06);
}

/* 密码输入 */
.scan-password-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.scan-hint {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.scan-password-input {
  width: 100%;
  max-width: 160px;
  padding: 8px 12px;
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.3s;
}

.scan-password-input:focus {
  border-color: var(--color-primary);
}

.scan-login-btn {
  padding: 8px 24px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #e8a54b, #d4883a);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scan-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(232, 165, 75, 0.3);
}

.scan-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hidden-file-input {
  display: none;
}

/* ===== 昵称+密码对话框 ===== */
.profile-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: safe center;
  justify-content: center;
  z-index: 1000;
  animation: overlayFadeIn 0.5s ease-out;
}

@keyframes overlayFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes overlayFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.profile-dialog-overlay.closing {
  animation: overlayFadeOut 0.4s ease-in forwards;
}

.profile-dialog {
  background: linear-gradient(160deg, #2d2520 0%, #251e1a 100%);
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 340px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  width: 90%;
  animation: dialogGentleIn 0.5s ease-out;
}

.profile-dialog::-webkit-scrollbar {
  display: none;
}

@keyframes dialogGentleIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dialogGentleOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

.profile-dialog-overlay.closing .profile-dialog {
  animation: dialogGentleOut 0.4s ease-in forwards;
}

.profile-dialog-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-accent-light);
  text-align: center;
  margin-bottom: 14px;
}

.profile-dialog-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 18px;
}

.profile-dialog-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-input {
  padding: 12px 16px;
  border: 1px solid rgba(232, 165, 75, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  transition: all 0.3s ease;
}

.profile-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.1), 0 0 15px rgba(232, 165, 75, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.profile-input::placeholder {
  color: var(--text-tertiary);
}

.profile-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  border-radius: 10px;
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(232, 165, 75, 0.25);
}

.profile-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 165, 75, 0.35);
}

.profile-submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.profile-skip-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(232, 165, 75, 0.15);
  border-radius: 10px;
  color: var(--text-tertiary);
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.3s ease;
}

.profile-skip-btn:hover {
  border-color: rgba(232, 165, 75, 0.3);
  color: var(--text-secondary);
}

/* ===== 接力浮层 ===== */
.relay-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 0;
  margin-bottom: 12px;
}

.relay-stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.relay-stats-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-accent-light);
  line-height: 1;
}

.relay-stats-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.relay-stats-divider {
  width: 1px;
  height: 36px;
  background: rgba(232, 165, 75, 0.2);
}

.relay-success-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-accent-light);
  text-align: center;
  padding: 24px 0;
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.donate-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* 捐助面板 */
.donate-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(232, 165, 75, 0.06);
  border-radius: 10px;
  margin-top: 8px;
  border: 1px solid rgba(232, 165, 75, 0.12);
  animation: slideDown 0.3s ease;
}

.donate-desc {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: left;
  margin: 0;
  padding: 0 4px;
  white-space: pre-line;
}

.donate-options {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
}

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

.donate-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 11px;
}

.donate-qr {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: #fff;
}

.paypal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 112, 186, 0.12);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0, 112, 186, 0.2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  align-self: center;
}

.paypal-btn:hover {
  background: rgba(0, 112, 186, 0.22);
  border-color: rgba(0, 112, 186, 0.35);
  transform: translateY(-1px);
}

/* 弹窗通用（保留 scaleIn 动画） */

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 按钮保留（recovery modal 复用） */

/* 提示消息 */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(45, 37, 32, 0.95);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid rgba(232, 165, 75, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(232, 165, 75, 0.1);
  z-index: 1001;
  animation: toastEntrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 14px;
  backdrop-filter: blur(10px);
}

@keyframes toastEntrance {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ===== 通行证卡片样式（用于截图） ===== */
.keepsake-container {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: -1;
}

.keepsake-card {
  width: 400px;
  background: linear-gradient(160deg, #2d2520 0%, #251e1a 50%, #1f1a16 100%);
  border-radius: 24px;
  padding: 0;
  border: 2px solid rgba(232, 165, 75, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(232, 165, 75, 0.1);
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.keepsake-header {
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(232, 165, 75, 0.1), transparent);
  border-bottom: 1px solid rgba(232, 165, 75, 0.2);
}

.keepsake-logo {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.keepsake-body {
  padding: 40px 30px;
  text-align: center;
}

.keepsake-candle {
  position: relative;
  width: 60px;
  height: 80px;
  margin: 0 auto 20px;
}

.keepsake-flame {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 30px;
  background: linear-gradient(to top, var(--flame-outer), var(--flame-mid), var(--flame-inner), var(--flame-core));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 20px var(--flame-mid), 0 0 40px rgba(255, 159, 67, 0.5);
  animation: keepsakeFlicker 2s ease-in-out infinite;
}

@keyframes keepsakeFlicker {
  0%, 100% { transform: translateX(-50%) scale(1) rotate(-2deg); }
  50% { transform: translateX(-50%) scale(1.05) rotate(2deg); }
}

.keepsake-candle-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  background: linear-gradient(to right, #f5f5dc, #fff8e7, #f5f5dc);
  border-radius: 3px 3px 8px 8px;
}

.keepsake-rank {
  color: var(--color-primary);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(232, 165, 75, 0.5);
}

.keepsake-greeting {
  color: var(--color-accent-light);
  font-size: 18px;
  margin-bottom: 8px;
}

.keepsake-message {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.keepsake-meta {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 20px;
}

.keepsake-footer {
  padding: 15px 30px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.keepsake-footer span {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* ===== 位置选择器 ===== */
.location-section {
  width: 100%;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(232, 165, 75, 0.1);
}

.location-display, .location-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.location-icon {
  font-size: 16px;
}

#locationText {
  color: var(--color-accent-light);
  font-size: 14px;
}

.location-hint {
  color: var(--text-tertiary);
  font-size: 12px;
}

.country-select {
  padding: 10px 14px;
  border: 1px solid rgba(232, 165, 75, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 150px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.country-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.country-select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* ===== 按钮样式 ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  border-radius: 50px;
  padding: 18px 44px;
  color: var(--text-inverse);
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 4px 20px rgba(232, 165, 75, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  transition: left 0.5s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 30px rgba(232, 165, 75, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.btn-primary:disabled {
  background: #3a3330;
  color: #6a6360;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== PoW 进度文字滑动动画 ===== */
.pow-stage-text {
  display: inline-block;
  animation: powSlideInOut 3s ease forwards;
}

@keyframes powSlideInOut {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  6.7% {
    opacity: 1;
    transform: translateX(0);
  }
  73.3% {
    opacity: 1;
    transform: translateX(0);
  }
  80% {
    opacity: 0;
    transform: translateX(-20px);
  }
  80.1%, 100% {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* ===== 和平宣言（折叠式） ===== */
.manifest-collapsible {
  border-top: 1px solid rgba(232, 165, 75, 0.15);
  border-bottom: 1px solid rgba(232, 165, 75, 0.15);
  background: rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
}

.manifest-scroller {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 48px;
  overflow: hidden;
  transition: opacity 0.5s ease-in-out, height 1.2s ease-in-out;
}

.manifest-collapsible.expanded .manifest-scroller {
  opacity: 0;
  height: 0;
  padding: 0 20px;
}

.manifest-sentence {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  opacity: 1;
  transition: opacity 0.5s ease;
  max-width: 100%;
}

.manifest-sentence.fade-out {
  opacity: 0;
}

.manifest-toggle {
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 10px 15px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.manifest-toggle:hover {
  background: rgba(232, 165, 75, 0.05);
  color: var(--color-accent-light);
}

.manifest-toggle .toggle-icon-expand,
.manifest-toggle .toggle-icon-collapse {
  display: flex;
  align-items: center;
  gap: 4px;
}

.manifest-full {
  overflow: hidden;
  max-height: 0;
  transition: max-height 1.2s ease-in-out;
}

.manifest-full.expanded {
  max-height: 300px;
}

.manifest-full-content {
  padding: 15px 20px;
  white-space: pre-line;
  line-height: 2;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  background: rgba(0, 0, 0, 0.1);
  max-height: 260px;
  overflow-y: auto;
}

.manifest-full-content::-webkit-scrollbar {
  width: 4px;
}

.manifest-full-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.manifest-full-content::-webkit-scrollbar-thumb {
  background: rgba(232, 165, 75, 0.3);
  border-radius: 2px;
}

.manifest-author {
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 10px;
  font-style: italic;
}

/* ===== 底部 ===== */
.footer {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
}

body.show-content .footer {
  animation: fadeIn 0.6s ease-out 1s forwards;
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  margin: 0 10px;
  font-size: 11px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ===== 通行证卡片 QR ===== */
.keepsake-qr {
  margin-top: 15px;
}

.keepsake-qr canvas {
  width: 190px;
  height: 190px;
  border-radius: 8px;
}

/* ===== About Passport 对话框 ===== */
.about-passport-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
  text-align: left;
}

.about-passport-item {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.about-item-icon {
  flex-shrink: 0;
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* ===== 全屏页面面板（关于、隐私、留言） ===== */
.page-panel {
  background: linear-gradient(160deg, #2d2520 0%, #251e1a 100%);
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  width: 92%;
  animation: dialogGentleIn 0.5s ease-out;
  position: relative;
}

.page-panel--narrow {
  max-width: 420px;
}

.page-panel-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

.page-panel-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-accent-light);
  text-align: center;
}

.page-panel-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.page-panel-close:hover {
  color: var(--color-primary);
}

.page-panel-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 165, 75, 0.2) transparent;
}

.page-panel-body::-webkit-scrollbar {
  width: 4px;
}

.page-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.page-panel-body::-webkit-scrollbar-thumb {
  background: rgba(232, 165, 75, 0.2);
  border-radius: 4px;
}

.page-section {
  margin-bottom: 20px;
}

.page-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-light);
  margin-bottom: 8px;
}

.page-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 功能列表 */
.about-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-feature-item {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.about-item-icon {
  flex-shrink: 0;
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* 隐私页 */
.privacy-updated {
  font-size: 11px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 16px;
}

/* 留言表单 */
.message-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.message-textarea {
  padding: 12px 16px;
  border: 1px solid rgba(232, 165, 75, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  transition: all 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.message-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.message-textarea::placeholder {
  color: var(--text-tertiary);
}

.message-char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: -8px;
}

.message-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 12px;
}

/* 响应式 */
@media (max-width: 480px) {
  .page-panel {
    padding: 20px 16px;
    max-width: 100%;
    width: 95%;
    max-height: 90vh;
    border-radius: 12px;
  }

  .page-section h4 {
    font-size: 13px;
  }

  .page-section p {
    font-size: 12px;
  }
}

/* ===== Map Pin - 倒立水滴定位针 ===== */
.map-pin-wrapper {
  background: none !important;
  border: none !important;
}

.map-pin {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 40% 35%, #f4c472 0%, #e8a54b 50%, #c4873a 100%);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow:
    0 1px 4px rgba(232, 165, 75, 0.5),
    0 0 10px rgba(232, 165, 75, 0.3);
  animation: pinGlow 4s ease-in-out infinite;
  position: relative;
}

.map-pin::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes pinGlow {
  0%, 100% {
    box-shadow:
      0 2px 8px rgba(232, 165, 75, 0.5),
      0 0 20px rgba(232, 165, 75, 0.3);
  }
  50% {
    box-shadow:
      0 2px 12px rgba(232, 165, 75, 0.7),
      0 0 30px rgba(232, 165, 75, 0.5);
  }
}

/* ===== Map Pin 越弹动画 ===== */
@keyframes pinBounce {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  30% { transform: rotate(-45deg) translateY(-14px); }
  50% { transform: rotate(-45deg) translateY(-4px); }
  70% { transform: rotate(-45deg) translateY(-8px); }
}
.map-pin.pin-bounce { animation: pinBounce 1.5s ease-out; }

/* ===== Map Pin 气泡 Popup ===== */
.pin-bubble-popup .leaflet-popup-content-wrapper {
  background: rgba(45, 37, 32, 0.95);
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 10px;
  color: rgba(232, 196, 160, 0.9);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
}
.pin-bubble-popup .leaflet-popup-content {
  margin: 0;
}
.pin-bubble-popup .leaflet-popup-tip {
  background: rgba(45, 37, 32, 0.95);
  border: 1px solid rgba(232, 165, 75, 0.3);
  box-shadow: none;
}
.pin-bubble-popup .leaflet-popup-close-button {
  display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .container {
    padding: 20px 16px;
  }

  .title {
    font-size: 22px;
  }

  .peace-card {
    margin: 24px 12px;
    border-radius: 20px;
  }

  .peace-card__stats {
    padding: 28px 20px 20px;
  }

  .peace-card__candle {
    padding: 20px 20px 48px;
    margin-top: 60px;
  }

  .peace-card__honor {
    padding: 8px 20px 24px;
  }

  .counter-wrapper {
    padding: 14px 16px;
  }

  .rolling-counter {
    gap: 3px;
  }

  .counter-digit {
    width: 28px;
    height: 38px;
    font-size: 18px;
    border-radius: 6px;
  }

  .counter-separator {
    width: 8px;
    font-size: 16px;
  }

  .counter-label {
    font-size: 10px;
    letter-spacing: 2px;
  }

  #map {
    height: 35vh;
  }

  .candle-container {
    width: 90px;
    height: 100px;
  }

  .telepathy-bubble,
  .talking-bubble {
    top: auto;
    bottom: 15px;
    left: 6%;
    right: 6%;
    max-width: none;
    text-align: center;
  }

  .candle-body {
    width: 42px;
    height: 75px;
  }

  .candle-base {
    width: 52px;
  }

  .btn-primary {
    padding: 16px 36px;
    font-size: 15px;
  }

  .cert-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cert-actions .action-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .certificate {
    padding: 18px 14px 12px;
  }

  .cert-main {
    font-size: 12px;
  }

  .cert-highlight-rank {
    font-size: 20px;
  }

  .cert-qr-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cert-qr-image canvas {
    width: 120px;
    height: 120px;
  }

  .profile-dialog {
    padding: 24px 18px;
    max-width: 300px;
  }

  .share-poster-preview img {
    width: 150px;
  }

  .share-prompt-dialog {
    max-height: 85vh;
  }

  .intro-text-line {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
}

/* 更窄屏幕的额外适配 */
@media (max-width: 380px) {
  .counter-digit {
    width: 24px;
    height: 34px;
    font-size: 15px;
  }

  .counter-separator {
    width: 6px;
    font-size: 14px;
  }

  .rolling-counter {
    gap: 2px;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .particle {
    display: none;
  }
}

/* ===== Language Switcher ===== */
.lang-switcher {
  position: absolute;
  bottom: 92px;
  left: 10px;
  z-index: 1001;
  user-select: none;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
}

.lang-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  list-style: none;
  margin: 0;
  padding: 2px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  min-width: 80px;
  overflow: hidden;
}

.lang-dropdown.hidden {
  display: none;
}

.lang-option {
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.85);
}

.lang-option.active{
  color: rgba(0, 0, 0, 0.85);
  font-weight: 600;
}

/* ===== 分享引导浮层 ===== */

.share-prompt-dialog {
  max-width: 440px;
}

/* 左右布局：海报左 + 文案右 */
.share-content-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.share-poster-preview {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.share-poster-preview img {
  width: 150px;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 12px;
  background: #0a0a0a;
}

/* 海报引导动画（脉冲呼吸） */
.poster-guide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  border-radius: 0 0 12px 12px;
  text-align: center;
  pointer-events: none;
}

.poster-guide-overlay span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  animation: posterGuidePulse 2s ease-in-out infinite;
}

@keyframes posterGuidePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.share-copy-selector {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.share-copy-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
}

.share-copy-options::-webkit-scrollbar {
  display: none;
}

.share-copy-options::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(transparent, #251e1a);
  pointer-events: none;
  flex-shrink: 0;
}

.share-copy-option {
  padding: 8px 12px;
  border: 1px solid rgba(232, 165, 75, 0.15);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  text-align: left;
  line-height: 1.4;
}

.share-copy-option:hover {
  border-color: rgba(232, 165, 75, 0.4);
  color: var(--text-primary);
}

.share-copy-option.active {
  border-color: #e8a54b;
  color: #ffd93d;
  background: rgba(232, 165, 75, 0.08);
}

.share-prompt-rank {
  font-size: 24px;
  font-weight: 700;
  color: #ffd93d;
  text-align: center;
  margin-bottom: 8px;
}

.share-prompt-date,
.share-prompt-location {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
}

.share-prompt-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.share-prompt-actions .profile-submit-btn {
  flex: 1;
}

.share-copy-link-btn {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(232, 165, 75, 0.4);
  color: #e8a54b;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.share-copy-link-btn:hover {
  background: rgba(232, 165, 75, 0.1);
  border-color: #e8a54b;
}

.share-prompt-skip-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(232, 165, 75, 0.15);
  color: var(--text-secondary);
  padding: 10px 0;
  margin-top: 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.share-prompt-skip-btn:hover {
  opacity: 0.9;
}

.share-prompt-hint {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.5;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ===== 微信分享引导层 ===== */

.wechat-share-guide {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wechat-share-guide.hidden {
  display: none;
}

.wechat-guide-arrow {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 50px;
  height: 50px;
  border: 3px solid #ffd93d;
  border-radius: 50%;
  animation: wechatGuidePulse 1.5s ease-in-out infinite;
}

.wechat-guide-arrow::before {
  content: '↗';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #ffd93d;
}

@keyframes wechatGuidePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

.wechat-guide-card {
  background: linear-gradient(135deg, #2d2520, #251e1a);
  border: 1px solid rgba(232, 165, 75, 0.3);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  max-width: 300px;
  width: 85%;
}

.wechat-guide-card p {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.wechat-guide-card .wechat-guide-sub {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-bottom: 20px;
}

.wechat-guide-card .profile-submit-btn {
  width: 100%;
}

/* ===== 引导动画 ===== */

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  clip-path: inset(0 0 0 0);
}

.intro-overlay.reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 3s ease-in-out;
}

.intro-text-line {
  color: #f5e6c8;
  font-size: 1.25rem;
  text-align: center;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  line-height: 1.8;
  max-width: 95%;
  white-space: nowrap;
}

.intro-text-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-text-line.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.intro-active .container,
body.intro-active .footer {
  opacity: 0;
  pointer-events: none;
}

/* ===== Intro 背景图片层 ===== */
.intro-bg {
  position: absolute;
  inset: 0;
  background: url('/images/intro.jpg') center center / cover no-repeat;
  z-index: 0;
}

/* ===== Intro 黑色遮罩层（控制图片可见度） ===== */
.intro-bg-mask {
  position: absolute;
  inset: 0;
  background: #0a0a0e;
  opacity: 1;
  z-index: 1;
  transition: opacity 1.5s ease-in-out;
}

/* Line 2 出现 → 遮罩变半透明，图片若隐若现 */
.intro-bg-mask.mask-fade-in {
  opacity: 0.5;
}

/* Line 4 出现 → 遮罩回到不透明，图片隐入黑暗 */
.intro-bg-mask.mask-fade-out {
  opacity: 1;
}

/* 确保文字在遮罩之上 */
.intro-text-line {
  z-index: 2;
}

/* ===== Intro 完成后内容揭示 ===== */
body.intro-done #map,
body.intro-done .title-section,
body.intro-done .peace-card,
body.intro-done .footer,
body.intro-done .particles-container {
  opacity: 1;
}

/* ===== 首次访问加载指示器（纯 CSS，不依赖 JS） ===== */
body:not(.show-content):not(.intro-done):not(.intro-active)::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(232, 165, 75, 0.2);
  border-top-color: #e8a54b;
  border-radius: 50%;
  opacity: 0;
  z-index: 9998;
  animation: spinnerFadeIn 0.5s ease 3s forwards, spin 1s linear 3s infinite;
}

@keyframes spinnerFadeIn {
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
