/* ==================== 基础样式 ==================== */

:root {
  /* 核心色板 - 与 screen.css 统一 */
  --primary: #7C3AED;
  /* Neon Purple */
  --primary-glow: rgba(124, 58, 237, 0.5);
  --secondary: #A78BFA;
  /* Light Purple */
  --secondary-glow: rgba(167, 139, 250, 0.5);
  --accent: #00F0FF;
  /* Cyan Laser */
  --accent-glow: rgba(0, 240, 255, 0.5);
  --danger: #F43F5E;
  /* Rose Red */
  --warning: #F59E0B;
  --success: #10B981;
  --gold: #FFD700;

  --bg-dark: #0F0F23;
  /* Match Screen Midnight Blue */
  --bg-card: rgba(30, 27, 75, 0.6);
  /* Deeper Glassmorphism */
  --bg-input: rgba(15, 23, 42, 0.8);

  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* 间距系统 (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);
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
}

* {
  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: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh; /* 使用动态视口高度 */
  overflow-x: hidden;
  position: relative;
  /* 平滑字体渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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 {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#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;
  min-height: 100vh;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: 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: 0 8px 25px var(--primary-glow);
  }

  .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: 'Space Grotesk', sans-serif;
  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;
}

.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;
  width: 100px;
  height: 100px;
}

.countdown-ring svg {
  transform: rotate(-90deg);
}

.countdown-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.countdown-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.countdown-ring.urgent .countdown-progress {
  stroke: var(--danger);
}

.countdown-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 700;
}

.countdown-ring.urgent .countdown-number {
  color: var(--danger);
  animation: flash 0.5s ease-in-out infinite;
}

@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: 'Space Grotesk', sans-serif;
}

.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: 'Space Grotesk', sans-serif;
}

/* ==================== 结果页面 ==================== */

.result-content {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding-bottom: 120px;
}

.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: 'Space Grotesk', sans-serif;
}

.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: 'Space Grotesk', sans-serif;
}

.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: 'Space Grotesk', sans-serif;
}

.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: 'Space Grotesk', sans-serif;
}

.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: 'Space Grotesk', sans-serif;
  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: 'Space Grotesk', sans-serif;
  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);
  }

  .logo h1 {
    font-size: 48px;
  }

  .logo .subtitle {
    font-size: 18px;
  }
}

/* 移动设备 (最大 768px) */
@media (max-width: 768px) {
  .screen {
    padding: var(--spacing-md);
  }

  .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;
  }
}