/* 全局样式 - 深色赛博电竞风格 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0d1117;
  --bg-card: rgba(20, 27, 45, 0.85);
  --bg-card-hover: rgba(30, 40, 60, 0.9);
  --text-primary: #e6edf3;
  --text-secondary: #8892b0;
  --text-muted: #636c83;
  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-green: #00ff88;
  --accent-red: #ff5252;
  --accent-orange: #ff9800;
  --accent-gold: #ffd700;
  --border-color: rgba(0, 212, 255, 0.15);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

html, body {
  width: 100%; min-height: 100vh;
  background: var(--bg-primary); color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px; line-height: 1.6; overflow-x: hidden;
}

#particle-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.page-wrapper {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto;
  padding: 0 16px 80px; min-height: 100vh;
}

.page-wrapper.admin { max-width: 100%; padding: 0 20px 40px; }

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
input, textarea, button, select { font-family: inherit; font-size: inherit; border: none; outline: none; background: none; color: inherit; }
button { cursor: pointer; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 4px; }

/* 毛玻璃卡片 */
.glass-card {
  background: var(--bg-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 12px;
}

/* 霓虹按钮 */
.btn-neon {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid var(--accent-cyan); border-radius: var(--radius-sm);
  color: var(--accent-cyan); font-size: 14px; font-weight: 600;
  transition: all 0.3s ease; width: 100%;
}
.btn-neon:active { transform: scale(0.97); box-shadow: var(--glow-cyan); }
.btn-neon:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { border-color: var(--accent-red); color: var(--accent-red); background: linear-gradient(135deg, rgba(255,82,82,0.15), rgba(255,82,82,0.05)); }
.btn-success { border-color: var(--accent-green); color: var(--accent-green); background: linear-gradient(135deg, rgba(0,255,136,0.15), rgba(0,255,136,0.05)); }
.btn-sm { padding: 6px 12px; font-size: 12px; width: auto; }

/* 表单 */
.form-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 14px; transition: border-color 0.3s ease;
}
.form-input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: none; min-height: 80px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }

/* 标签页 */
.tab-bar {
  display: flex; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 8px 16px; border-radius: 20px; font-size: 13px; white-space: nowrap;
  background: rgba(255, 255, 255, 0.05); color: var(--text-secondary);
  transition: all 0.3s ease; cursor: pointer;
}
.tab-item.active {
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(168,85,247,0.2));
  color: var(--accent-cyan); border: 1px solid var(--accent-cyan);
}

/* 状态标签 */
.status-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.status-pending { background: rgba(255,152,0,0.15); color: var(--accent-orange); }
.status-success { background: rgba(0,255,136,0.15); color: var(--accent-green); }
.status-danger { background: rgba(255,82,82,0.15); color: var(--accent-red); }
.status-info { background: rgba(0,212,255,0.15); color: var(--accent-cyan); }

/* 底部导航 */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; justify-content: space-around; align-items: center;
  height: 56px; background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color); z-index: 100;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-secondary); font-size: 11px; transition: color 0.3s ease; cursor: pointer;
}
.bottom-nav-item.active { color: var(--accent-cyan); }
.bottom-nav-item .nav-icon { font-size: 22px; }

/* 弹窗 */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-content {
  width: 100%; max-width: 400px; background: var(--bg-secondary);
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 24px; max-height: 80vh; overflow-y: auto;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; text-align: center; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 加载 */
.loading-spinner { display: flex; justify-content: center; align-items: center; padding: 40px; }
.loading-spinner::after {
  content: ''; width: 32px; height: 32px;
  border: 3px solid rgba(0, 212, 255, 0.2); border-top-color: var(--accent-cyan);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 页面标题 */
.page-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 0; font-size: 18px; font-weight: 700;
}
.back-btn { font-size: 22px; color: var(--accent-cyan); cursor: pointer; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 16px; text-align: center;
}
.stat-value { font-size: 24px; font-weight: 700; color: var(--accent-cyan); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 渐变文字 */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* 用户信息头部 */
.user-header {
  display: flex; align-items: center; gap: 12px; padding: 20px 0;
}
.user-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
}
.user-name { font-size: 18px; font-weight: 600; }
.user-balance { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.user-balance span { color: var(--accent-gold); font-weight: 600; }

/* 菜单列表 */
.menu-list { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer; transition: background 0.2s ease;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: rgba(255,255,255,0.03); }
.menu-item-left { display: flex; align-items: center; gap: 12px; }
.menu-item-icon { font-size: 20px; }
.menu-item-text { font-size: 14px; }
.menu-item-arrow { color: var(--text-muted); font-size: 14px; }

/* 赛事卡片 */
.match-card { cursor: pointer; transition: transform 0.2s ease; }
.match-card:active { transform: scale(0.98); }
.match-card .match-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.match-card .match-info { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-secondary); }
.match-card .match-info-item { display: flex; align-items: center; gap: 4px; }
.match-card .match-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* 金额选择 */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.amount-card {
  padding: 16px; border-radius: var(--radius-sm); text-align: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer; transition: all 0.3s ease; position: relative;
}
.amount-card.active { border-color: var(--accent-cyan); background: rgba(0,212,255,0.1); }
.amount-card .amount-value { font-size: 20px; font-weight: 700; color: var(--accent-cyan); }
.amount-card .amount-desc { font-size: 11px; color: var(--accent-orange); margin-top: 4px; min-height: 14px; }

/* 图片上传 */
.upload-area {
  width: 100%; min-height: 120px; border: 2px dashed rgba(0,212,255,0.3);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.3s ease; background: rgba(0,212,255,0.03);
}
.upload-area:active { border-color: var(--accent-cyan); }
.upload-placeholder { text-align: center; color: var(--text-muted); }
.upload-placeholder .upload-icon { font-size: 32px; margin-bottom: 8px; }
.preview-img { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--radius-sm); }

/* 管理员样式 */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 20px;
}
.admin-title { font-size: 20px; font-weight: 700; color: var(--accent-cyan); }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-nav-item {
  padding: 6px 14px; border-radius: var(--radius-sm); font-size: 13px;
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  cursor: pointer; transition: all 0.3s ease;
}
.admin-nav-item.active { background: rgba(0,212,255,0.15); color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); font-weight: 600; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.data-table tr:hover { background: rgba(255,255,255,0.02); }

/* 响应式 */
@media (max-width: 768px) {
  .page-wrapper.admin { padding: 0 12px 40px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px; }
}
