/* ==================== Toast通知样式 ==================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.3);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  max-width: 400px;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid var(--success);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
}

.toast-error {
  border-left: 4px solid var(--danger);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 63, 94, 0.3);
}

.toast-warning {
  border-left: 4px solid var(--warning);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.3);
}

.toast-info {
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

/* ==================== 基础样式 ==================== */

:root {
  /* 核心色板 - Dark Mode (OLED) 优化 */
  --primary: #7C3AED;
  /* Neon Purple - 主品牌色 */
  --primary-glow: rgba(124, 58, 237, 0.6);
  --primary-light: rgba(124, 58, 237, 0.15);
  --secondary: #A78BFA;
  /* Light Purple */
  --secondary-glow: rgba(167, 139, 250, 0.5);
  --accent: #00F0FF;
  /* Cyan Laser - 强调色 */
  --accent-glow: rgba(0, 240, 255, 0.6);
  --danger: #F43F5E;
  /* Rose Red - CTA颜色 */
  --danger-glow: rgba(244, 63, 94, 0.5);
  --warning: #F59E0B;
  --success: #10B981;
  --gold: #FFD700;

  /* 背景色板 - OLED优化 */
  --bg-dark: #0F0F23;
  /* 深蓝黑背景 */
  --bg-card: rgba(30, 27, 75, 0.7);
  /* 增强卡片不透明度，提高可见性 */
  --bg-card-hover: rgba(30, 27, 75, 0.85);
  --bg-input: rgba(15, 23, 42, 0.9);
  /* 输入框更不透明，提高对比度 */
  --bg-overlay: rgba(15, 15, 35, 0.9);

  /* 文本色板 - 增强对比度 */
  --text-primary: #F1F5F9;
  /* 更亮的白色，提高可读性 */
  --text-secondary: #CBD5E1;
  /* 更亮的次要文本 */
  --text-muted: #94A3B8;
  /* 保持适度的对比度 */

  /* 间距系统 (8px 基准) */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* 过渡时间 */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --transition-slower: 500ms;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #C026D3 100%);
  --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);

  /* 阴影和边框 - 增强视觉效果 */
  --shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.4);
  --border-glass: 1px solid rgba(255, 255, 255, 0.15);
  /* 增强边框可见性 */
  --border-glass-hover: 1px solid rgba(124, 58, 237, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 可访问性：尊重用户的动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh; /* 使用动态视口高度 */
  overflow: hidden; /* 禁止所有滚动 */
  position: fixed; /* 固定定位，防止滚动 */
  width: 100%;
  /* 平滑字体渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 禁止触摸滚动 */
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

#app {
  height: 100vh;
  height: 100dvh; /* 使用动态视口高度 */
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden; /* 禁止滚动 */
  /* 禁止触摸滚动 */
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

#app::before,
#app::after {
  display: none;
}

#app::before {
  top: -100px;
  left: -100px;
  background: var(--primary);
}

#app::after {
  bottom: -100px;
  right: -100px;
  background: var(--secondary);
  animation-delay: -10s;
}

@keyframes float-glow {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(50px, 100px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 50px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* ==================== 屏幕切换 ==================== */

.screen {
  display: none !important; /* 强制隐藏非活动页面 */
  position: absolute; /* 绝对定位，重叠显示 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* 使用动态视口高度 */
  max-height: 100vh;
  max-height: 100dvh;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden; /* 禁止内容溢出滚动 */
  box-sizing: border-box;
  /* 禁止触摸滚动 */
  touch-action: none;
  -webkit-overflow-scrolling: none;
  visibility: hidden; /* 额外隐藏 */
}

.screen.active {
  display: flex !important; /* 强制显示活动页面 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible; /* 确保可见 */
}

/* 仅在用户未禁用动画时播放 */
@media (prefers-reduced-motion: no-preference) {
  .screen.active {
    animation: fadeInSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes questionEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== 加入游戏页面 ==================== */

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.logo h1 {
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

.form-container {
  width: 100%;
  max-width: 320px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

/* ==================== 按钮 ==================== */

.btn {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  min-height: 48px; /* 触摸友好的最小高度 */
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slower) ease;
}

/* 悬停状态 - 仅在非触摸设备上 */
@media (hover: hover) and (pointer: fine) {
.btn.primary:hover::before {
  left: 100%;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  cursor: pointer;
}

  .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
  }
}

/* 焦点状态 - 键盘导航 */
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 4px 20px var(--primary-glow), 0 0 0 4px rgba(0, 240, 255, 0.2);
}

.btn.primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 15px var(--primary-glow);
}

.btn.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: var(--border-glass);
  backdrop-filter: blur(12px);
}

/* 禁用状态 */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.large {
  padding: var(--spacing-lg) var(--spacing-xl);
  font-size: 18px;
  min-height: 56px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-icon .lucide {
  width: 20px;
  height: 20px;
}

/* ==================== 状态栏 ==================== */

.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  gap: 40px;
  border-top: var(--border-glass);
  z-index: 100;
}

.status-item {
  text-align: center;
}

.status-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--secondary);
  filter: drop-shadow(0 0 5px var(--secondary-glow));
}

.status-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ==================== 等待页面 (Neural Link Upgrade) ==================== */

.waiting-content {
  text-align: center;
  position: relative;
}

.neural-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring-1 {
  width: 180px;
  height: 180px;
  border-top-color: var(--primary);
  border-bottom-color: var(--primary);
  animation: rotate-cw 3s linear infinite;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.ring-2 {
  width: 140px;
  height: 140px;
  border-left-color: var(--secondary);
  border-right-color: var(--secondary);
  border-style: dashed;
  animation: rotate-ccw 2s linear infinite;
  filter: drop-shadow(0 0 8px var(--secondary-glow));
}

.ring-3 {
  width: 100px;
  height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  animation: rotate-cw 1.5s linear infinite;
}

.scan-ray {
  position: absolute;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary));
  top: 50%;
  left: 50%;
  transform-origin: left center;
  animation: rotate-cw 2s linear infinite;
  filter: blur(1px);
  opacity: 0.6;
}

@keyframes rotate-cw {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-ccw {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

.waiting-icon {
  position: relative;
  z-index: 2;
  color: var(--text-primary);
  filter: drop-shadow(0 0 15px var(--primary-glow));
  animation: hub-pulse 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes hub-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.waiting-title-text {
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.player-name-display {
  color: var(--secondary);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.tip-box {
  margin-top: 40px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 12px;
  text-align: left;
  flex-shrink: 0; /* 防止收缩 */
  overflow: hidden; /* 禁止滚动 */
}

.tip-box p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

.tip-box p:last-child {
  margin-bottom: 0;
}

/* ==================== 游戏页面 ==================== */

.countdown-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.countdown-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 固定尺寸，防止动画导致位置变化 */
  width: 60px;
  height: 60px;
  /* 确保容器尺寸稳定，不受内容影响 */
  flex-shrink: 0;
  /* 使用固定定位，防止内容变化影响布局 */
  min-width: 60px;
  min-height: 60px;
}

.countdown-ring.urgent {
  /* 紧急状态时保持完全相同的尺寸 */
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
}

.countdown-number {
  /* 使用固定尺寸的容器，确保位置稳定 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  /* 防止文本选择 */
  user-select: none;
  -webkit-user-select: none;
  /* 确保数字始终居中 */
  margin: 0;
  padding: 0;
  /* 固定定位，不受任何动画影响 */
  position: relative;
  /* 使用box-sizing确保尺寸计算一致 */
  box-sizing: border-box;
  /* 确保文本垂直居中 */
  vertical-align: middle;
}

.countdown-ring.urgent .countdown-number {
  color: var(--danger);
  /* 保持相同的字体大小，避免位置变化 */
  font-size: 32px;
  font-weight: 800;
  /* 保持相同的容器尺寸 */
  width: 60px;
  height: 60px;
  /* 使用动画效果，只影响视觉效果，不影响位置 */
  animation: urgentNumberGlow 0.5s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(244, 63, 94, 0.8), 0 0 40px rgba(244, 63, 94, 0.5);
  filter: drop-shadow(0 0 10px rgba(244, 63, 94, 1));
  /* 确保位置完全稳定 */
  position: relative;
  /* 确保所有属性都保持一致 */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

@keyframes urgentRingPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes urgentProgressGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.8));
    stroke-width: 8;
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(244, 63, 94, 1));
    stroke-width: 10;
  }
}

@keyframes urgentNumberGlow {
  0%, 100% {
    text-shadow: 0 0 20px rgba(244, 63, 94, 0.8), 0 0 40px rgba(244, 63, 94, 0.5);
    filter: drop-shadow(0 0 10px rgba(244, 63, 94, 1));
    opacity: 1;
  }
  50% {
    text-shadow: 0 0 30px rgba(244, 63, 94, 1), 0 0 60px rgba(244, 63, 94, 0.8);
    filter: drop-shadow(0 0 15px rgba(244, 63, 94, 1.2));
    opacity: 0.95;
  }
}

@keyframes flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.countdown-label {
  font-size: 18px;
  color: var(--text-secondary);
}

.investment-form {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.investment-form h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.hint {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.slider-container {
  position: relative;
  margin-bottom: 24px;
  padding: 20px 0;
}

#investment-slider {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  appearance: none;
  outline: none;
}

#investment-slider::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  background: var(--gradient-1);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

.slider-value {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: left 0.1s ease, transform 0.1s ease;
  white-space: nowrap; /* 防止文字换行 */
  pointer-events: none; /* 防止阻挡滑杆交互 */
}

.number-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.number-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.number-btn:hover {
  background: var(--primary);
}

.number-btn:active {
  transform: scale(0.95);
}

#investment-input {
  width: 100px;
  height: 60px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--bg-input);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
}

#investment-input:focus {
  border-color: var(--primary);
}

.warning {
  color: var(--warning);
  font-size: 12px;
  margin-top: 16px;
}

/* ==================== 已提交页面 ==================== */

.submitted-content {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: var(--border-glass);
  border-radius: 24px;
  width: 100%;
  max-width: 320px;
}

.check-mark {
  width: 90px;
  height: 90px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin: 0 auto 24px;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
  0% {
    transform: scale(0);
    rotate: -45deg;
  }

  100% {
    transform: scale(1);
    rotate: 0;
  }
}

.submitted-content h2 {
  font-size: 26px;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.submitted-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.highlight {
  color: var(--secondary);
  font-weight: 700;
  font-size: 28px;
  text-shadow: 0 0 10px var(--secondary-glow);
}

.waiting-text {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  margin-top: 30px;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.countdown-mini {
  margin-top: 40px;
  font-size: 16px;
  color: var(--text-secondary);
}

.countdown-mini span:first-child {
  color: var(--accent);
  font-weight: 700;
  font-size: 26px;
  margin-right: 4px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

/* ==================== 结果页面 ==================== */

.result-content {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: var(--spacing-lg);
  overflow: hidden; /* 禁止滚动 */
  box-sizing: border-box;
}

.result-header {
  margin-bottom: 30px;
}

.result-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px var(--primary-glow));
  animation: pop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-icon.soulmate {
  color: #ec4899;
  filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.5));
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.result-icon.winner {
  color: #fbbf24;
  filter: drop-shadow(0 0 25px rgba(251, 191, 36, 0.6));
}

.result-header h2 {
  font-size: 32px;
  margin-bottom: 12px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.soulmate-text {
  color: var(--text-secondary);
  font-style: italic;
}

.destiny-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 16px;
}

.destiny-a {
  background: rgba(6, 182, 212, 0.1);
  color: var(--secondary);
  border: 1px solid var(--secondary);
  box-shadow: 0 0 15px var(--secondary-glow);
}

.destiny-b {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: var(--border-glass);
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 24px;
  box-shadow: var(--shadow), inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.asset-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.asset-label {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.asset-value {
  font-size: 56px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px var(--primary-glow));
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.asset-unit {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.result-details {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  text-align: left;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-muted);
  font-size: 14px;
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.detail-value.highlight {
  color: var(--secondary);
  text-shadow: 0 0 8px var(--secondary-glow);
}

.detail-divider {
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
  margin: 10px 0;
}

.soulmate-info {
  text-align: center;
  padding: 16px;
}

.soulmate-info p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.soulmate-info strong {
  color: var(--primary-light);
}

/* ==================== 排行榜弹窗 ==================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: flex-end;
  /* iPhone style bottom sheet */
  justify-content: center;
}

@media (min-width: 500px) {
  .modal {
    align-items: center;
    padding: 20px;
  }
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #0f172a;
  border-top: 2px solid var(--primary);
  border-radius: 30px 30px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@media (min-width: 500px) {
  .modal-content {
    border: var(--border-glass);
    border-radius: 24px;
    border-top: 3px solid var(--primary);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.close-btn:hover {
  background: var(--accent);
}

.ranking-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  margin-bottom: 10px;
  transition: transform 0.2s;
}

.ranking-item.top-1 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02));
  border-color: rgba(251, 191, 36, 0.3);
}

.ranking-item.top-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.02));
  border-color: rgba(148, 163, 184, 0.3);
}

.ranking-item.top-3 {
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.1), rgba(146, 64, 14, 0.02));
  border-color: rgba(146, 64, 14, 0.3);
}

.ranking-item.soulmate {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(236, 72, 153, 0.02));
  border-color: rgba(236, 72, 153, 0.3);
}

.ranking-item.is-me {
  background: rgba(124, 58, 237, 0.1);
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.ranking-item .rank {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.ranking-item .name {
  flex: 1;
  margin-left: 14px;
  font-weight: 500;
  font-size: 15px;
}

.ranking-item .soulmate-badge {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border-radius: 20px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ranking-item .asset {
  font-weight: 700;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: var(--secondary);
}

/* ==================== 粒子背景 ==================== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -20px;
  width: 4px;
  height: 4px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  border-radius: 50%;
  opacity: 0.2;
  animation: float-up 25s linear infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.2;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ==================== 连接状态 ==================== */

.connection-status {
  position: fixed;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border: var(--border-glass);
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 1000;
}

.connection-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.connection-status.connected .dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.connection-status.disconnected .dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

/* ==================== Lucide 图标通用适配 ==================== */
.lucide {
  stroke-width: 2px;
  vertical-align: middle;
}

i[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==================== 揭晓页面 ==================== */
.revealing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}

.neural-reveal {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.reveal-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 0.5s ease;
}

.reveal-ring.outer {
  width: 100%;
  height: 100%;
  border-top-color: var(--primary);
  border-bottom-color: var(--primary-glow);
  animation: rotate 4s linear infinite;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.reveal-ring.middle {
  width: 80%;
  height: 80%;
  border: 2px dashed var(--secondary);
  border-left-color: var(--secondary-glow);
  animation: rotate 3s linear reverse infinite;
}

.reveal-ring.inner {
  width: 60%;
  height: 60%;
  border: 2px solid var(--primary);
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

.scan-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px var(--primary-glow);
  animation: scan-sweep 3s ease-in-out infinite;
  opacity: 0.8;
  z-index: 2;
}

@keyframes scan-sweep {

  0%,
  100% {
    top: 10%;
    opacity: 0;
  }

  20%,
  80% {
    opacity: 1;
  }

  50% {
    top: 90%;
  }
}

.sync-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 15px var(--primary-glow));
  z-index: 3;
  animation: heartBeat 2s ease-in-out infinite;
}

#reveal-status-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#reveal-status-desc {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.partner-highlight {
  color: var(--secondary);
  font-weight: 700;
  text-shadow: 0 0 10px var(--secondary-glow);
}

.soulmate-alert-banner {
  margin-top: 40px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 15px 25px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--danger);
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.soulmate-alert-banner.active {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.2);
}

.soulmate-alert-banner i {
  animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.celebrate-pulse {
  animation: celebrate-bounce 0.8s ease-in-out infinite;
}

@keyframes scanning-pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.02);
    filter: brightness(1.2);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.neural-container.scanning {
  animation: scanning-pulse 0.5s ease-in-out infinite;
}

.neural-container.scanning .neural-ring {
  border-width: 3px;
}

.soulmate-detected {
  transition: background-color 2s ease;
}

@keyframes celebrate-bounce {

  0%,
  100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.1) translateY(-10px);
  }
}

.glow-text {
  text-shadow: 0 0 10px rgba(124, 58, 237, 0.8), 0 0 20px rgba(124, 58, 237, 0.5);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* ==================== 响应式 ==================== */

@media (max-width:360px) {
  .logo h1 {
    font-size: 32px;
  }

  .asset-value {
    font-size: 44px;
  }

  .neural-container {
    width: 160px;
    height: 160px;
  }

  .ring-1 {
    width: 150px;
    height: 150px;
  }

  .ring-2 {
    width: 120px;
    height: 120px;
  }

  .ring-3 {
    width: 90px;
    height: 90px;
  }
}

/* ==================== 全局响应式优化 ==================== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
  .screen {
    padding: var(--spacing-lg);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .logo h1 {
    font-size: 48px;
  }

  .logo .subtitle {
    font-size: 18px;
  }
}

/* 移动设备 (最大 768px) */
@media (max-width: 768px) {
  .screen {
    padding: var(--spacing-md);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .btn {
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 16px;
  }

  .btn.large {
    min-height: 52px;
    padding: var(--spacing-lg) var(--spacing-xl);
  }

  .status-bar {
    padding: var(--spacing-md);
  }
}

/* 小屏移动设备 (最大 480px) */
@media (max-width: 480px) {
  .screen {
    padding: var(--spacing-sm);
  }

  .btn {
    min-height: 44px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 15px;
  }

  .logo h1 {
    font-size: 36px;
  }

  .logo .subtitle {
    font-size: 16px;
  }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 600px) {
  .screen {
    padding: var(--spacing-sm);
  }

  .logo {
    margin-bottom: var(--spacing-lg);
  }

  .logo h1 {
    font-size: 40px;
    margin-bottom: var(--spacing-sm);
  }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .particle {
    width: 4px;
    height: 4px;
  }
}

/* Android 设备特定优化 - 减小字体大小 */
@media screen and (max-width: 768px) {
  /* 检测 Android 设备（非 iOS） */
  @supports not (-webkit-touch-callout: none) {
    /* 减小基础字体大小 */
    html {
      font-size: 14px;
    }
    
    /* 答题页面字体优化 */
    .question-text {
      font-size: 1.15em; /* 从1.3em减小 */
      line-height: 1.5;
    }
    
    .question-category {
      font-size: 0.75em; /* 从0.85em减小 */
    }
    
    .round-badge,
    .question-number {
      font-size: 0.8em; /* 从0.9em减小 */
    }
    
    /* 倒计时字体优化 - 保持固定尺寸避免位置偏移 */
    .countdown-ring {
      width: 50px;
      height: 50px;
      min-width: 50px;
      min-height: 50px;
    }
    
    .countdown-ring.urgent {
      width: 50px;
      height: 50px;
      min-width: 50px;
      min-height: 50px;
    }
    
    .countdown-number {
      width: 50px;
      height: 50px;
      font-size: 24px;
    }
    
    .countdown-ring.urgent .countdown-number {
      width: 50px;
      height: 50px;
      /* 保持相同的字体大小，避免位置变化 */
      font-size: 24px;
    }
    
    /* 选项字体优化 */
    .option-text {
      font-size: 0.95em; /* 从1.05em减小 */
      line-height: 1.4;
    }
    
    .option-label {
      font-size: 1em; /* 从1.1em减小 */
      width: 36px; /* 从40px减小 */
      height: 36px;
    }
    
    .option-item {
      padding: var(--spacing-md); /* 从var(--spacing-lg)减小 */
    }
    
    /* 结果页面字体优化 */
    .result-title {
      font-size: 1.9em; /* 从2.2em减小 */
    }
    
    .result-message {
      font-size: 1.1em; /* 从1.25em减小 */
      line-height: 1.5;
    }
    
    .score-value {
      font-size: 3.8em; /* 从4.5em减小 */
    }
    
    .score-label {
      font-size: 0.9em; /* 从1em减小 */
    }
    
    .result-icon i {
      width: 130px; /* 从150px减小 */
      height: 130px;
    }
    
    /* Android结果页面布局优化 - 避免得分结果太靠下 */
    .result-content {
      padding: var(--spacing-lg) var(--spacing-lg); /* 减小上下内边距 */
      gap: var(--spacing-lg); /* 减小间距 */
      justify-content: flex-start; /* 从顶部开始 */
    }
    
    .score-display {
      margin-top: var(--spacing-sm); /* 进一步减小顶部间距 */
      padding: var(--spacing-lg) var(--spacing-md); /* 减小内边距 */
      gap: var(--spacing-md); /* 减小内部间距 */
    }
    
    .result-icon {
      min-height: 120px; /* 减小图标区域高度 */
      padding: var(--spacing-lg) 0; /* 减小上下内边距 */
    }
    
    .result-title {
      min-height: 60px; /* 减小标题高度 */
      padding: var(--spacing-sm) var(--spacing-lg); /* 减小内边距 */
    }
    
    .result-message {
      min-height: 50px; /* 减小消息高度 */
      padding: var(--spacing-sm) var(--spacing-lg); /* 减小内边距 */
    }
    
    /* 倒计时圆圈大小优化 - 保持固定尺寸避免位置偏移 */
    .countdown-ring {
      width: 50px;
      height: 50px;
      min-width: 50px;
      min-height: 50px;
    }
    
    .countdown-ring.urgent {
      width: 50px;
      height: 50px;
      min-width: 50px;
      min-height: 50px;
    }
    
    .countdown-number {
      width: 50px;
      height: 50px;
      font-size: 24px;
    }
    
    .countdown-ring.urgent .countdown-number {
      width: 50px;
      height: 50px;
      /* 保持相同的字体大小，避免位置变化 */
      font-size: 24px;
    }
    
    /* 题目头部间距优化 */
    .question-header {
      margin-bottom: var(--spacing-lg); /* 从var(--spacing-xl)减小 */
    }
    
    /* 选项容器间距优化 */
    .options-container {
      gap: var(--spacing-sm); /* 从var(--spacing-md)减小 */
      margin-top: var(--spacing-lg); /* 从var(--spacing-xl)减小 */
    }
  }
}

/* ==================== 一站到底 - 问答游戏特定样式 ==================== */

/* 答题页面样式 */
#question-screen {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 禁止滚动 */
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  flex-shrink: 0; /* 防止收缩 */
  width: 100%;
  max-width: 600px;
}

.question-info {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.round-badge {
  background: var(--gradient-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9em;
}

.question-number {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.countdown-display {
  position: relative;
}

/* 移除旧的重复样式定义，使用上面统一的样式（674-727行） */

/* 移除旧的urgent样式定义，使用上面统一的.countdown-ring.urgent .countdown-number样式 */

.question-content {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden; /* 禁止滚动 */
  min-height: 0; /* 允许 flex 收缩 */
}

.question-text {
  font-size: 1.3em;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.question-category {
  display: inline-block;
  background: rgba(124, 58, 237, 0.2);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  color: var(--secondary);
  margin-bottom: var(--spacing-lg);
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  flex: 1;
  overflow: hidden; /* 禁止滚动 */
  min-height: 0; /* 允许 flex 收缩 */
  max-height: 100%; /* 限制最大高度 */
}

.option-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  animation: optionItemEnter 0.3s ease backwards;
  opacity: 0;
}

.option-item {
  opacity: 1;
}

.option-item {
  opacity: 1;
}

@keyframes optionItemEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.option-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.option-item:active::before {
  width: 300px;
  height: 300px;
}

@media (hover: hover) and (pointer: fine) {
  .option-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    border-color: var(--glass-border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-glow);
    cursor: pointer;
  }
}

.option-item:active {
  transform: translateX(4px) scale(0.97);
  transition: transform 0.1s ease;
}

.option-item:disabled,
.option-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.option-item.selected {
  background: rgba(124, 58, 237, 0.4);
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: var(--shadow-glow), inset 0 0 20px rgba(124, 58, 237, 0.2);
  animation: optionSelect 0.3s ease;
  transform: scale(1.02);
  cursor: pointer;
}

.option-item.unselected {
  opacity: 0.4;
  filter: grayscale(0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

@keyframes optionSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.1em;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
  font-size: 1.05em;
  line-height: 1.5;
}

.answer-status {
  margin-top: var(--spacing-lg);
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-icon {
  animation: resultIconEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 0; /* 使用gap控制间距 */
}

.result-icon.result-success {
  animation: resultSuccess 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-icon.result-success i {
  filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.6));
}

.result-icon.result-error {
  animation: resultError 0.6s ease;
}

.result-icon.result-error i {
  filter: drop-shadow(0 0 20px rgba(244, 63, 94, 0.6));
}

@keyframes resultIconEnter {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes resultSuccess {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes resultError {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.1) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.answer-submitted {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  color: var(--success);
  animation: slideInFade 0.3s ease;
}

/* 确认答案容器 */
.confirm-answer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  animation: slideInFade 0.3s ease;
  margin-top: var(--spacing-md);
}

.confirm-message {
  font-size: 16px;
  color: var(--text-primary);
  text-align: center;
}

.confirm-message strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.confirm-buttons {
  display: flex;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 400px;
}

.confirm-buttons .btn {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.confirm-buttons .btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.confirm-buttons .btn-primary:hover {
  background: #6D28D9;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
  transform: translateY(-2px);
}

.confirm-buttons .btn-primary:active {
  transform: translateY(0);
}

.confirm-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.confirm-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.submitting-message,
.submitted-message {
  text-align: center;
  padding: var(--spacing-md);
  color: var(--text-primary);
  font-size: 16px;
  animation: slideInFade 0.3s ease;
}

.submitting-message {
  color: var(--accent);
}

.submitted-message {
  color: var(--success);
}

@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 结果页面样式 */
#result-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl); /* 增加屏幕内边距 */
}

.result-content {
  text-align: center;
  max-width: 520px; /* 稍微增加最大宽度 */
  width: 100%;
  padding: var(--spacing-xl) var(--spacing-xl); /* 调整上下内边距 */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl); /* 调整间距，让布局更协调 */
  justify-content: flex-start; /* 从顶部开始，避免Android上得分结果太靠下 */
  align-items: center; /* 水平居中 */
  min-height: auto; /* 不强制最小高度 */
}

.result-icon {
  margin-bottom: 0; /* 移除底部边距，使用gap控制 */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px; /* 增加图标区域高度 */
  padding: var(--spacing-xl) 0; /* 增加上下内边距 */
  width: 100%;
}

.result-icon i {
  width: 150px; /* 进一步增大图标 */
  height: 150px;
}

.result-title {
  font-size: 2.2em; /* 稍微减小标题，保持协调 */
  margin-bottom: 0; /* 移除底部边距，使用gap控制 */
  font-weight: 700;
  line-height: 1.4; /* 增加行高 */
  padding: var(--spacing-md) var(--spacing-xl); /* 增加水平内边距 */
  min-height: 70px; /* 确保标题有足够高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.result-message {
  color: var(--text-secondary);
  margin-bottom: 0; /* 移除底部边距，使用gap控制 */
  font-size: 1.25em; /* 调整字体大小，保持协调 */
  line-height: 1.6; /* 调整行高 */
  padding: var(--spacing-md) var(--spacing-xl); /* 增加水平内边距 */
  min-height: 60px; /* 确保消息有足够高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg); /* 调整内部间距 */
  padding: var(--spacing-xl) var(--spacing-lg); /* 调整内边距，保持协调 */
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: var(--border-glass);
  margin-top: var(--spacing-md); /* 减小顶部间距，避免Android上太靠下 */
  width: 100%;
  max-width: 400px; /* 限制最大宽度，保持协调 */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); /* 添加阴影增强层次感 */
  flex-shrink: 0; /* 防止收缩 */
}

.score-label {
  color: var(--text-secondary);
  font-size: 1em; /* 调整字体大小，保持协调 */
  font-weight: 600; /* 增加字重 */
  letter-spacing: 0.5px; /* 调整字间距 */
  padding: var(--spacing-sm) 0; /* 增加上下内边距 */
  text-transform: uppercase; /* 大写显示 */
  width: 100%;
  text-align: center;
}

.score-value {
  font-size: 4.5em; /* 稍微减小得分数字，保持协调 */
  font-weight: 900; /* 增加字重 */
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  filter: drop-shadow(0 0 15px var(--primary-glow)); /* 增强发光效果 */
  padding: var(--spacing-md) 0; /* 增加上下内边距 */
  min-height: 90px; /* 确保数字有足够高度 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

/* 第一轮结果页面 */
#round1-result-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}

.round-result-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
  padding: var(--spacing-lg);
  overflow: hidden; /* 禁止滚动 */
  box-sizing: border-box;
  max-height: 100vh; /* 限制最大高度 */
}

.round-result-content h2 {
  font-size: 2em;
  margin-bottom: var(--spacing-xl);
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  border: var(--border-glass);
}

.my-result h3 {
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
}

.result-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: var(--spacing-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.stat-value {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--primary);
}

.qualified-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: white;
  margin-top: var(--spacing-md);
}

.not-qualified {
  color: var(--text-secondary);
  margin-top: var(--spacing-md);
}

.waiting-text {
  color: var(--text-secondary);
  margin-top: var(--spacing-lg);
}

/* 最终结果页面 */
#final-result-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.final-result-content {
  max-width: 700px;
  width: 100%;
  padding: var(--spacing-lg);
  overflow: hidden; /* 禁止滚动 */
  box-sizing: border-box;
  max-height: 100vh; /* 限制最大高度 */
}

.result-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.result-header h1 {
  font-size: 2.5em;
  margin-bottom: var(--spacing-md);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: var(--border-glass);
}

.ranking-item.is-me {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.2);
}

.ranking-item.top-1 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: var(--gold);
}

.ranking-item.top-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.05) 100%);
  border-color: #C0C0C0;
}

.ranking-item.top-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.05) 100%);
  border-color: #CD7F32;
}

.ranking-item .rank {
  font-weight: 700;
  font-size: 1.2em;
  min-width: 40px;
}

.ranking-item .name {
  flex: 1;
  font-size: 1.1em;
}

.ranking-item .score {
  font-weight: 600;
  color: var(--primary);
}

.ranking-item .time {
  color: var(--text-secondary);
  font-size: 0.9em;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}