﻿* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); min-height: 100vh; color: #fff; }

.app { max-width: 480px; margin: 0 auto; padding: 16px; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: bold; background: linear-gradient(90deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-info { font-size: 12px; color: #aaa; }
.user-info .accent { color: #667eea; font-weight: bold; }
.user-info .sep { margin: 0 6px; color: #555; }
.btn-login { background: linear-gradient(90deg, #667eea, #764ba2); color: #fff; border: none; padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; }

/* Hero */
.hero { text-align: center; padding: 30px 0 20px; }
.hero h1 { font-size: 28px; font-weight: bold; margin-bottom: 8px; }
.hero .subtitle { color: #aaa; font-size: 14px; }

/* Card */
.card { background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border-radius: 16px; padding: 20px; margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.1); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: #e0e0e0; }

/* Bind */
.bind-card .card-header { display: flex; flex-direction: column; gap: 12px; }
.bind-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.bind-input { flex: 1; min-width: 120px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 10px 14px; color: #fff; font-size: 14px; }
.bind-input::placeholder { color: #666; }
.bind-input:focus { outline: none; border-color: #667eea; }

/* Amount Grid */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 16px 10px; cursor: pointer; transition: all 0.2s; color: #fff; display: flex; align-items: center; justify-content: center; }
.amount-btn:hover { background: rgba(102,126,234,0.2); border-color: #667eea; }
.amount-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); border-color: #667eea; box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
.amount-value { font-size: 18px; font-weight: bold; }
.custom-input { width: 100%; margin-top: 12px; padding: 14px 16px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; color: #fff; font-size: 16px; }
.custom-input::placeholder { color: #666; }
.custom-input:focus { outline: none; border-color: #667eea; }

/* Pay Grid */
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 16px 10px; cursor: pointer; transition: all 0.2s; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pay-btn:hover { background: rgba(255,255,255,0.12); border-color: #667eea; }
.pay-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); border-color: #667eea; }
.pay-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; }
.pay-icon.alipay { background: #1677ff; }
.pay-icon.wechat { background: #07c160; }
.pay-icon.xiaoyu { background: linear-gradient(135deg, #f56c6c, #e6a23c); }
.pay-name { font-size: 13px; color: #ccc; }

/* Confirm */
.confirm-card { text-align: center; }
.confirm-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.confirm-label { color: #aaa; }
.confirm-value { font-weight: bold; }
.confirm-value.highlight { color: #667eea; font-size: 20px; }

/* Buttons */
.btn-primary { background: linear-gradient(90deg, #667eea, #764ba2); color: #fff; border: none; padding: 10px 20px; border-radius: 10px; font-size: 14px; cursor: pointer; font-weight: 600; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.15); padding: 10px 20px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.btn-submit { width: 100%; background: linear-gradient(90deg, #667eea, #764ba2); color: #fff; border: none; padding: 14px; border-radius: 12px; font-size: 16px; cursor: pointer; font-weight: bold; margin-top: 16px; box-shadow: 0 4px 20px rgba(102,126,234,0.4); }
.btn-submit:hover { opacity: 0.95; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Orders */
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-item { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.order-left { font-size: 12px; color: #aaa; }
.order-left .order-no { font-family: monospace; color: #888; margin-bottom: 4px; }
.order-left .order-meta { display: flex; gap: 12px; }
.order-right { text-align: right; }
.order-amount { font-weight: bold; font-size: 16px; color: #667eea; }
.order-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.order-status.pending { background: #e6a23c; color: #fff; }
.order-status.paid { background: #409eff; color: #fff; }
.order-status.confirmed { background: #67c23a; color: #fff; }
.empty { text-align: center; color: #666; padding: 20px; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-content { background: #1a1a2e; border-radius: 16px; padding: 24px; max-width: 380px; width: 90%; border: 1px solid rgba(255,255,255,0.1); max-height: 90vh; overflow-y: auto; overflow-x: hidden; }
.modal-content h3 { text-align: center; margin-bottom: 16px; font-size: 18px; color: #fff; }
.qr-carousel { position: relative; margin: 16px 0; overflow: hidden; width: 100%; height: 220px; }
.qr-wrapper { position: relative; width: 100%; height: 100%; }
.qr-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; opacity: 0; transition: opacity 0.3s ease; }
.qr-slide img { max-width: 180px; max-height: 180px; border-radius: 8px; }
.qr-empty { padding: 40px; color: #666; }
.qr-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; z-index: 2; display: flex; align-items: center; justify-content: center; }
.qr-nav:hover { background: rgba(0,0,0,0.7); }
.qr-prev { left: 8px; }
.qr-next { right: 8px; }
.qr-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 10px; }
.qr-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.2s; }
.qr-dot.active { background: #667eea; width: 16px; border-radius: 4px; }
.pay-detail { background: rgba(255,255,255,0.05); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.pay-detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.pay-detail-row:last-child { border-bottom: none; }
.pay-detail-row span:first-child { color: #aaa; }
.pay-detail-row span:last-child { color: #fff; font-weight: 500; }
.pay-detail-row .highlight { color: #667eea; font-size: 16px; font-weight: bold; }
.transfer-input-wrap { margin: 12px 0; }
.transfer-input { width: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 12px 14px; color: #fff; font-size: 14px; box-sizing: border-box; }
.transfer-input::placeholder { color: #666; }
.transfer-input:focus { outline: none; border-color: #667eea; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.header-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { color: #fff; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,0.1); }

/* Submit button */
.btn-submit.full { width: 100%; margin-top: 8px; }

/* Orders Page */
.orders-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back-btn { color: #aab; text-decoration: none; font-size: 14px; }
.back-btn:hover { color: #fff; }
.orders-header h2 { font-size: 18px; }
.order-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.order-tab { background: transparent; border: none; color: #888; padding: 8px 14px; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.order-tab.active { color: #fff; border-bottom-color: #667eea; }
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-card { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.08); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-close { font-size: 11px; color: #e74c3c; }
.card-time { font-size: 11px; color: #666; }
.status-badge { font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 500; }
.st-pending { background: #f39c12; color: #fff; }
.st-paid { background: #3498db; color: #fff; }
.st-confirmed { background: #27ae60; color: #fff; }
.st-failed { background: #e74c3c; color: #fff; }
.st-closed { background: #7f8c8d; color: #fff; }
.card-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cell-left { flex: 1; min-width: 0; }
.cell-right { text-align: right; flex-shrink: 0; }
.cell-label { font-size: 11px; color: #888; margin-bottom: 2px; }
.cell-value { font-size: 13px; color: #fff; font-weight: 500; }
.card-no { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-amt { color: #667eea; font-weight: bold; font-size: 14px; }
.card-line-sub { margin-top: 8px; font-size: 12px; color: #aaa; }
.cell-sub { flex: 1; }
.card-actions { display: flex; gap: 10px; margin-top: 12px; }
.card-actions button { flex: 1; padding: 8px 0; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; }
.btn-pay { background: #667eea; color: #fff; }
.btn-close { background: rgba(255,255,255,0.1); color: #aaa; border: 1px solid rgba(255,255,255,0.15); }
.card-fail-reason { margin-top: 8px; padding: 8px 10px; background: rgba(231,76,60,0.15); border-left: 3px solid #e74c3c; font-size: 12px; color: #e74c3c; border-radius: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; }

/* Footer */
.footer { text-align: center; padding: 20px 0; color: #555; font-size: 12px; }

.subtitle { text-align: center; display: flex; justify-content: center; gap: 30px; align-items: center; }


/* ===== Messages Page ===== */
.msg-bell { position: relative; }
.msg-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: #e74c3c; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: bold; }
.page-header { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.back-btn { background: none; border: none; color: #fff; font-size: 14px; cursor: pointer; padding: 4px 10px; }
.page-header h2 { flex: 1; color: #fff; font-size: 16px; margin: 0; text-align: center; }
.btn-mark-all { background: none; border: 1px solid rgba(255,255,255,0.2); color: #aaa; font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.msg-list { padding: 12px; }
.msg-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 10px; margin-bottom: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.msg-card.unread { background: rgba(255,255,255,0.07); border-color: rgba(124, 58, 237, 0.3); }
.msg-card.msg-success { border-left: 3px solid #22c55e; }
.msg-card.msg-fail { border-left: 3px solid #ef4444; }
.msg-card.msg-broadcast { border-left: 3px solid #7c3aed; }
.msg-icon { font-size: 22px; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; }
.msg-title .dot { width: 8px; height: 8px; background: #7c3aed; border-radius: 50%; display: inline-block; }
.msg-content { font-size: 13px; color: #aaa; margin-top: 4px; line-height: 1.5; }
.msg-time { font-size: 11px; color: #666; margin-top: 6px; }

/* ========== 登录注册页 ========== */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 20px;
}
.auth-container { width: 100%; max-width: 400px; }
.auth-brand { text-align: center; margin-bottom: 32px; }
.auth-logo { font-size: 64px; margin-bottom: 12px; }
.auth-brand h1 { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.auth-brand p { font-size: 14px; color: rgba(255,255,255,0.6); }
.auth-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: rgba(0,0,0,0.2); border-radius: 12px; padding: 4px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  background: transparent; color: rgba(255,255,255,0.6);
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.auth-tab.active { background: #4f6ef7; color: #fff; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.auth-field input {
  width: 100%; padding: 14px 16px; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; background: rgba(15,20,40,0.85) !important; color: #fff;
  font-size: 15px; outline: none; transition: border-color .2s;
  -webkit-appearance: none; appearance: none;
}
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(15,20,40,0.95) inset !important;
  box-shadow: 0 0 0 1000px rgba(15,20,40,0.95) inset !important;
  background: rgba(15,20,40,0.95) !important;
}
.auth-field input:focus { border-color: #4f6ef7; }
.auth-error {
  padding: 10px 14px; border-radius: 8px; background: rgba(255,60,60,0.15);
  border: 1px solid rgba(255,60,60,0.3); color: #ff6b6b; font-size: 13px; margin-bottom: 16px;
}
.auth-submit {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,110,247,0.4); }
.auth-submit:active { transform: translateY(0); }
.auth-tip { text-align: center; margin-top: 14px; font-size: 12px; color: rgba(255,255,255,0.45); }
.user-row {
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}
.user-row strong { color: #fff; font-size: 15px; font-weight: 600; }

.qr-tip { display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(102,126,234,0.15); border: 1px solid rgba(102,126,234,0.35); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; color: #b8c5ff; font-size: 13px; line-height: 1.5; text-align: center; }
.qr-tip-icon { font-size: 15px; flex-shrink: 0; }
.qr-slide img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: default; touch-action: manipulation; }