/* 跑者联盟原型 基础样式 */

:root {
  --brand-primary: #FF6B35;
  --brand-primary-dark: #E5562A;
  --brand-secondary: #FFB800;
  --accent-success: #22C55E;
  --accent-danger: #EF4444;
  --bg-primary: #0F1115;
  --bg-card: #1A1D24;
  --bg-elevated: #252932;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A6B0;
  --text-muted: #6B7280;
  --border-subtle: #2A2E37;
}

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

html, body {
  background: #050608;
  color: var(--text-primary);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

/* 手机外壳 */
.phone-frame {
  width: 393px;
  height: 852px;
  background: var(--bg-primary);
  border-radius: 40px;
  border: 8px solid #2A2E37;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  margin: 20px auto;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.phone-screen::-webkit-scrollbar { display: none; }

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* 底部导航 */
.tab-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  z-index: 50;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 10px;
  text-decoration: none;
  transition: color 0.2s;
}

.tab-item.active {
  color: var(--brand-primary);
}

.tab-item svg {
  width: 24px;
  height: 24px;
}

/* 通用按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-primary);
  color: white;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary:active { transform: scale(0.97); background: var(--brand-primary-dark); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-elevated);
  color: white;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

/* 称号徽章 */
.badge-rank {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.badge-king    { background: linear-gradient(135deg, #9333EA, #DB2777); }
.badge-diamond { background: linear-gradient(135deg, #22D3EE, #3B82F6); }
.badge-platinum{ background: linear-gradient(135deg, #D1D5DB, #9CA3AF); color: #1F2937;}
.badge-gold    { background: linear-gradient(135deg, #FBBF24, #F59E0B); color: #1F2937;}
.badge-silver  { background: linear-gradient(135deg, #F3F4F6, #D1D5DB); color: #1F2937;}
.badge-bronze  { background: linear-gradient(135deg, #B45309, #92400E); }

/* 横向滚动 */
.marquee {
  display: flex;
  gap: 16px;
  animation: marquee-scroll 30s linear infinite;
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 999px;
  transition: width 0.3s;
}

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.list-item:last-child { border-bottom: none; }

/* 头像 */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand-primary);
}

.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tag-hot     { background: rgba(239, 68, 68, 0.15);  color: #F87171; }
.tag-new     { background: rgba(34, 197, 94, 0.15);  color: #4ADE80; }
.tag-vip     { background: rgba(255, 184, 0, 0.15);  color: #FFB800; }
.tag-default { background: var(--bg-elevated);       color: var(--text-secondary); }

/* 通用链接 */
a { color: inherit; text-decoration: none; }

/* 标题栏 */
.nav-bar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-primary);
  position: sticky;
  top: 44px;
  z-index: 40;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-bar h1 {
  font-size: 17px;
  font-weight: 600;
}

.nav-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

/* 跑量金色数字样式 */
.num-gold {
  background: linear-gradient(135deg, #FFB800, #FF6B35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 英雄区渐变 */
.hero-gradient {
  background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 50%, #FFB800 100%);
}