/* ============ 魔人电竞俱乐部 - 玩家端样式 ============ */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #f43f5e;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* 手机模拟外壳 */
.phone-wrapper {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* 通用组件 */
.page { flex: 1; padding-bottom: 70px; }
.page-padded { padding: 16px; }

.header {
  background: var(--gradient-primary);
  color: #fff;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-row { display: flex; align-items: center; gap: 12px; }
.header h1 { font-size: 20px; font-weight: 700; }
.header .back-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer;
  font-size: 18px; border: none; color: #fff;
}

/* 搜索框 */
.search-bar {
  background: rgba(255,255,255,0.2);
  border-radius: 25px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.search-bar input {
  background: transparent; border: none; outline: none;
  color: #fff; flex: 1; font-size: 14px;
}
.search-bar input::placeholder { color: rgba(255,255,255,0.7); }

/* 轮播 Banner */
.banner {
  margin: 16px;
  border-radius: 16px;
  overflow: hidden;
  height: 140px;
  position: relative;
  background: var(--gradient-accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center;
}
.banner-content { z-index: 1; padding: 20px; }
.banner h2 { font-size: 22px; margin-bottom: 8px; }
.banner p { font-size: 13px; opacity: 0.9; }
.banner::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent);
}

/* 热门游戏 */
.section { margin: 16px; }
.section-title {
  font-size: 17px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .more { font-size: 13px; color: var(--text-light); font-weight: 400; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.game-item {
  text-align: center; cursor: pointer; padding: 10px 4px;
  border-radius: 12px; background: var(--card-bg);
  transition: transform 0.2s;
}
.game-item:active { transform: scale(0.95); }
.game-item .icon { font-size: 32px; display: block; margin-bottom: 4px; }
.game-item .name { font-size: 12px; color: var(--text-secondary); }

/* 服务分类 */
.category-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.category-item {
  background: var(--card-bg); border-radius: 12px; padding: 16px 8px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--border);
}
.category-item:active { transform: scale(0.96); border-color: var(--primary); }
.category-item .icon { font-size: 28px; margin-bottom: 6px; }
.category-item .name { font-size: 13px; font-weight: 600; }

/* 保障区 */
.guarantee {
  background: var(--card-bg); border-radius: 12px; padding: 16px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.guarantee-item { text-align: center; }
.guarantee-item .icon { font-size: 22px; margin-bottom: 4px; }
.guarantee-item .text { font-size: 11px; color: var(--text-secondary); }

/* 服务卡片 */
.service-card {
  background: var(--card-bg); border-radius: 12px; padding: 14px;
  margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--border);
}
.service-card:active { transform: scale(0.98); }
.service-card .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.service-card .name { font-size: 15px; font-weight: 700; flex: 1; }
.service-card .price { font-size: 16px; font-weight: 700; color: var(--accent); }
.service-card .price .unit { font-size: 12px; font-weight: 400; }
.service-card .desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.service-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.service-card .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #eef2ff; color: var(--primary);
}
.service-card .tag.hot { background: #fef2f2; color: var(--accent); }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--card-bg); border-top: 1px solid var(--border);
  display: flex; height: 60px; z-index: 200;
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; color: var(--text-light); transition: color 0.2s;
}
.tabbar-item.active { color: var(--primary); }
.tabbar-item .icon { font-size: 22px; }
.tabbar-item .text { font-size: 11px; }

/* 按钮 */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 25px;
  border: none; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--gradient-primary); color: #fff; }
.btn-accent { background: var(--gradient-accent); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: var(--accent); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; outline: none;
  background: var(--card-bg); transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-textarea { min-height: 80px; resize: vertical; }

/* 订单卡片 */
.order-card {
  background: var(--card-bg); border-radius: 12px; padding: 14px;
  margin-bottom: 10px; cursor: pointer; border: 1px solid var(--border);
  transition: all 0.2s;
}
.order-card:active { transform: scale(0.98); }
.order-card .header-row { justify-content: space-between; margin-bottom: 10px; background: none; padding: 0; box-shadow: none; position: static; }
.order-card .order-no { font-size: 12px; color: var(--text-light); }
.order-card .status { font-size: 13px; font-weight: 600; }
.order-card .status.PENDING_PAYMENT { color: var(--warning); }
.order-card .status.PAID_PENDING_ACCEPT { color: var(--primary); }
.order-card .status.ASSIGNED { color: var(--primary); }
.order-card .status.IN_PROGRESS { color: #3b82f6; }
.order-card .status.WAITING_CONFIRM { color: var(--warning); }
.order-card .status.COMPLETED { color: var(--success); }
.order-card .status.CANCELLED { color: var(--text-light); }
.order-card .status.AFTER_SALE { color: var(--accent); }
.order-card .status.REFUNDING { color: var(--accent); }
.order-card .status.REFUNDED { color: var(--text-light); }
.order-card .body { display: flex; gap: 10px; margin-bottom: 10px; }
.order-card .game-icon { font-size: 28px; }
.order-card .info { flex: 1; }
.order-card .service-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.order-card .game-name { font-size: 12px; color: var(--text-secondary); }
.order-card .footer-row { display: flex; justify-content: space-between; align-items: center; }
.order-card .amount { font-size: 16px; font-weight: 700; color: var(--accent); }
.order-card .actions { display: flex; gap: 8px; }
.order-card .actions .btn { padding: 6px 14px; font-size: 13px; }

/* Tab 切换 */
.tabs {
  display: flex; background: var(--card-bg); border-bottom: 1px solid var(--border);
  overflow-x: auto; position: sticky; top: 0; z-index: 50;
}
.tab-item {
  padding: 12px 16px; white-space: nowrap; font-size: 14px;
  color: var(--text-secondary); cursor: pointer; position: relative;
  transition: color 0.2s;
}
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; background: var(--primary); border-radius: 2px;
}

/* 进度时间线 */
.timeline { padding: 8px 0; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; z-index: 1; background: var(--primary); color: #fff;
}
.timeline-dot.system { background: var(--text-light); }
.timeline-dot.staff { background: var(--success); }
.timeline-content { flex: 1; }
.timeline-content .text { font-size: 14px; margin-bottom: 4px; }
.timeline-content .time { font-size: 12px; color: var(--text-light); }
.timeline-images { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.timeline-images img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }

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

/* 加载 */
.loading { text-align: center; padding: 20px; color: var(--text-light); font-size: 14px; }

/* 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: 10px; font-size: 14px; z-index: 9999;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* Modal */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--card-bg); border-radius: 16px; width: 100%; max-width: 360px;
  overflow: hidden;
}
.modal-header { padding: 20px 20px 10px; font-size: 17px; font-weight: 700; text-align: center; }
.modal-body { padding: 10px 20px 20px; }
.modal-footer { display: flex; border-top: 1px solid var(--border); }
.modal-footer .btn { flex: 1; border-radius: 0; padding: 14px; }

/* 个人中心 */
.profile-header {
  background: var(--gradient-primary);
  color: #fff; padding: 24px 20px; text-align: center;
}
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.2); display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 8px; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-menu { background: var(--card-bg); margin: 12px; border-radius: 12px; overflow: hidden; }
.menu-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #f1f5f9; }
.menu-item .icon { font-size: 20px; margin-right: 12px; }
.menu-item .text { flex: 1; font-size: 15px; }
.menu-item .arrow { color: var(--text-light); }

/* 浮动客服 */
.fab {
  position: fixed; bottom: 80px; right: 20px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--gradient-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 150;
  transition: transform 0.2s;
}
.fab:active { transform: scale(0.9); }

/* 详情页 */
.detail-card { background: var(--card-bg); border-radius: 12px; padding: 16px; margin: 12px; }
.detail-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.detail-row .label { color: var(--text-secondary); }
.detail-row .value { font-weight: 600; text-align: right; }
.detail-row .value.highlight { color: var(--accent); font-size: 18px; }

/* 上传组件 */
.upload-area {
  border: 2px dashed var(--border); border-radius: 10px; padding: 20px;
  text-align: center; color: var(--text-light); cursor: pointer;
  transition: border-color 0.2s;
}
.upload-area:active { border-color: var(--primary); }
.upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview .img-item { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; position: relative; }
.upload-preview .img-item .remove { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* 评分 */
.rating-stars { display: flex; gap: 4px; }
.rating-stars .star { font-size: 28px; color: #e2e8f0; cursor: pointer; }
.rating-stars .star.active { color: #fbbf24; }
