/* ============================================================
   艺术 PK 竞技平台 - 全局样式
   艺术竞技风 / 年轻 / 舞台感 / 暗色主题
   ============================================================ */

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(30, 30, 60, 0.6);
  --bg-card-hover: rgba(40, 40, 80, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;
  --accent-blue: #4a90ff;
  --accent-red: #ff4a6a;
  --accent-gold: #ffd700;
  --accent-purple: #a040ff;
  --accent-green: #00e676;
  --gradient-blue: linear-gradient(135deg, #4a90ff, #00d4ff);
  --gradient-red: linear-gradient(135deg, #ff4a6a, #ff8a40);
  --gradient-gold: linear-gradient(135deg, #ffd700, #ffaa00);
  --gradient-purple: linear-gradient(135deg, #a040ff, #e040ff);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(74, 144, 255, 0.3);
  --topbar-h: 56px;
  --tabbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-primary);
}

/* ============ 顶部栏 ============ */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.topbar-left .logo { font-size: 22px; }
.topbar-left .title {
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.coins {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent-gold);
  cursor: pointer;
  font-weight: 600;
}
.coin-icon { font-size: 14px; }

.avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  font-size: 16px;
}

/* ============ 内容区 ============ */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + 10px);
}

/* ============ 底部导航 ============ */
.tabbar {
  height: var(--tabbar-h);
  display: flex;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}
.tab-item.active {
  color: var(--accent-purple);
}
.tab-icon { font-size: 22px; }
.tab-label { font-size: 10px; }

/* ============ 通用组件 ============ */
.section {
  padding: 12px 16px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}
.card:active { transform: scale(0.98); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--gradient-purple); }
.btn-blue { background: var(--gradient-blue); }
.btn-red { background: var(--gradient-red); }
.btn-gold { background: var(--gradient-gold); color: #333; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-secondary);
}
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px;
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent-blue); }
.textarea { resize: none; min-height: 80px; }

.label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

/* ============ 段位徽章 ============ */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.rank-badge .rank-icon { font-size: 14px; }

/* ============ 选手卡片 ============ */
.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s;
}
.player-card:active { transform: scale(0.98); }
.player-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-stats {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  gap: 10px;
}
.player-category {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(74, 144, 255, 0.15);
  color: var(--accent-blue);
}

/* ============ 作品卡片 ============ */
.work-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.work-media {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
}
.work-media video, .work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-media .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  opacity: 0.7;
  pointer-events: none;
}
.work-info {
  padding: 10px 12px;
}
.work-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.work-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.work-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
}
.work-action {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
}
.work-action.liked { color: var(--accent-red); }

/* ============ PK 对战房间 (全屏) ============ */
.pk-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: var(--bg-primary);
  overflow-y: auto;
  max-width: 500px;
  margin: 0 auto;
}

.pk-room {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1a0a2a 0%, #0a0a1a 50%, #0a1a2a 100%);
}

.pk-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
}
.pk-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}
.pk-timer {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pk-timer.urgent { color: var(--accent-red); animation: pulse 1s infinite; }

.pk-battle-area {
  display: flex;
  position: relative;
  padding: 0 12px;
  gap: 8px;
}
.pk-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pk-side.challenger { color: var(--accent-blue); }
.pk-side.defender { color: var(--accent-red); }

.pk-side-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 6px;
  border: 3px solid;
  overflow: hidden;
}
.pk-side.challenger .pk-side-avatar { border-color: var(--accent-blue); box-shadow: 0 0 15px rgba(74, 144, 255, 0.5); }
.pk-side.defender .pk-side-avatar { border-color: var(--accent-red); box-shadow: 0 0 15px rgba(255, 74, 106, 0.5); }
.pk-side-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pk-side-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.pk-side-rank {
  font-size: 11px;
  opacity: 0.8;
}
.pk-side-score {
  font-size: 28px;
  font-weight: 800;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.pk-side-works {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  margin-top: 6px;
  position: relative;
}
.pk-side-works video, .pk-side-works img {
  width: 100%; height: 100%; object-fit: cover;
}

.pk-vs-center {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  z-index: 2;
}

.pk-progress-bar {
  margin: 10px 16px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  position: relative;
}
.pk-progress-blue {
  background: var(--gradient-blue);
  transition: width 0.3s ease;
  border-radius: 4px 0 0 4px;
}
.pk-progress-red {
  background: var(--gradient-red);
  transition: width 0.3s ease;
  border-radius: 0 4px 4px 0;
  margin-left: auto;
}

.pk-gift-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pk-gift-bar::-webkit-scrollbar { display: none; }
.pk-gift-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}
.pk-gift-btn:active { transform: scale(0.92); }
.pk-gift-btn.selected { border-color: var(--accent-gold); background: rgba(255, 215, 0, 0.1); }
.pk-gift-btn .gift-icon { font-size: 20px; }
.pk-gift-btn .gift-name { font-size: 10px; color: var(--text-secondary); }
.pk-gift-btn .gift-price { font-size: 10px; color: var(--accent-gold); }

.pk-gift-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  align-items: center;
}
.pk-gift-side-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
}
.pk-gift-side-btn.blue { background: var(--gradient-blue); }
.pk-gift-side-btn.red { background: var(--gradient-red); }

.pk-chat {
  flex: 1;
  min-height: 120px;
  max-height: 200px;
  margin: 0 12px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-msg {
  font-size: 12px;
  margin-bottom: 4px;
  word-break: break-all;
}
.chat-msg .chat-nick { color: var(--accent-blue); font-weight: 600; }
.chat-msg.gift-msg { color: var(--accent-gold); }

.pk-chat-input {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.pk-chat-input input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.pk-chat-input button {
  padding: 8px 16px;
  background: var(--gradient-purple);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.pk-result {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.pk-result-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 16px;
}
.pk-result-title.win { color: var(--accent-gold); text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.pk-result-title.lose { color: var(--text-muted); }
.pk-result-title.draw { color: var(--text-secondary); }

.pk-bet-section {
  margin: 8px 16px;
  padding: 10px;
  background: rgba(255, 215, 0, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 215, 0, 0.2);
}
.pk-bet-title {
  font-size: 12px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}
.pk-bet-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============ 个人主页 ============ */
.profile-header {
  padding: 20px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(160, 64, 255, 0.15), transparent);
}
.profile-avatar-big {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 3px solid var(--accent-purple);
  overflow: hidden;
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; font-weight: 700; }
.profile-bio { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.profile-rank-display {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-stat {
  text-align: center;
}
.profile-stat-num { font-size: 18px; font-weight: 700; }
.profile-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.profile-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

/* ============ 排行榜 ============ */
.rank-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.rank-num {
  width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}
.rank-num.top1 { color: var(--accent-gold); font-size: 20px; }
.rank-num.top2 { color: #c0c0c0; font-size: 18px; }
.rank-num.top3 { color: #cd7f32; font-size: 17px; }

/* ============ 礼物选择面板 ============ */
.gift-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  padding: 16px;
  z-index: 200;
  max-height: 60vh;
  overflow-y: auto;
}
.gift-panel-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gift-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.gift-grid-item.selected { border-color: var(--accent-gold); }
.gift-grid-item .gift-icon { font-size: 28px; }
.gift-grid-item .gift-name { font-size: 12px; margin-top: 4px; }
.gift-grid-item .gift-price { font-size: 11px; color: var(--accent-gold); }

.gift-send-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.gift-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gift-qty-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.gift-qty-num { font-size: 16px; font-weight: 600; min-width: 30px; text-align: center; }

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  pointer-events: none;
  max-width: 300px;
  text-align: center;
}

/* ============ 礼物特效层 ============ */
.effects-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}
.effect-gift {
  position: absolute;
  font-size: 40px;
  animation: floatUp 2s ease-out forwards;
}

/* ============ 充值/提现 ============ */
.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 16px;
}
.recharge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.recharge-item.selected { border-color: var(--accent-gold); }
.recharge-item .recharge-coins {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
}
.recharge-item .recharge-price {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============ 分类标签 ============ */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.cat-tab.active {
  background: var(--gradient-purple);
  color: #fff;
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; }

/* ============ PK大厅 ============ */
.pk-hall-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pk-hall-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.pk-hall-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.pk-match-card {
  margin: 8px 16px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.pk-match-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pk-match-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.pk-match-vs {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  padding: 0 8px;
}
.pk-match-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============ 动画 ============ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-200px) scale(1.5); opacity: 0; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); }
}

.slide-up { animation: slideUp 0.3s ease; }
.fade-in { animation: fadeIn 0.3s ease; }
.glow-anim { animation: glow 2s infinite; }

/* ============ 滚动条隐藏 ============ */
.content::-webkit-scrollbar { display: none; }
.content { scrollbar-width: none; }

/* ============ 登录页 ============ */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}
.login-logo {
  font-size: 64px;
  margin-bottom: 16px;
}
.login-title {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.login-form {
  width: 100%;
  max-width: 300px;
}
.login-form .input {
  margin-bottom: 12px;
}
.login-form .btn {
  margin-bottom: 8px;
}

/* ============ PK发起弹窗 ============ */
.pk-challenge-modal {
  text-align: center;
}
.pk-challenge-modal .opponent-info {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.pk-challenge-modal .duration-options {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.pk-challenge-modal .duration-option {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
}
.pk-challenge-modal .duration-option.selected {
  border-color: var(--accent-purple);
  background: rgba(160, 64, 255, 0.1);
}

/* ============ 工作台/管理 ============ */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 16px;
}
.admin-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.admin-stat-num { font-size: 24px; font-weight: 700; color: var(--accent-purple); }
.admin-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ============ 通用工具 ============ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--accent-blue); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
