/* ======== 基础重置 ======== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e0e0e0;
  overflow-x: hidden;
  padding-bottom: 70px;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, textarea, select { font: inherit; }

/* ======== 加载 & Toast ======== */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(26, 26, 46, 0.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.loader-spinner {
  width: 48px; height: 48px; border: 4px solid rgba(102, 126, 234, 0.3);
  border-top-color: #667eea; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: #9aa0b4; font-size: 14px; }

.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(22, 33, 62, 0.95); color: #fff;
  padding: 12px 24px; border-radius: 24px; z-index: 10000;
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease;
  max-width: 80vw; text-align: center;
}
.toast.success { border-color: #4ade80; }
.toast.error { border-color: #f87171; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -20px); } }

.hidden { display: none !important; }

/* ======== 登录注册页 ======== */
.auth-container {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px;
}
.auth-logo {
  width: 160px; height: 160px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; overflow: hidden;
}
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-card {
  width: 100%; max-width: 400px;
  background: rgba(255,255,255,0.05); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 28px;
}
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; text-align: center; }
.auth-subtitle { color: #9aa0b4; text-align: center; margin-bottom: 24px; font-size: 13px; }
.auth-switch { text-align: center; margin-top: 16px; color: #9aa0b4; font-size: 13px; }
.auth-switch a { color: #667eea; font-weight: 600; }

/* ======== 表单 ======== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: #9aa0b4; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #e0e0e0; font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.form-input:focus { outline: none; border-color: #667eea; background: rgba(102,126,234,0.1); }
.form-input::placeholder { color: #5a5f72; }
textarea.form-input { resize: vertical; min-height: 80px; }

.btn {
  width: 100%; padding: 14px;
  border-radius: 12px; font-size: 15px; font-weight: 600;
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  box-shadow: 0 8px 24px rgba(102,126,234,0.4);
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: rgba(255,255,255,0.08); color: #e0e0e0; border: 1px solid rgba(255,255,255,0.15);
}
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; width: auto; }

/* ======== 主界面 ======== */
.main-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(22, 33, 62, 0.85); backdrop-filter: blur(20px);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.main-header h1 { font-size: 18px; font-weight: 700; }
.header-user { font-size: 13px; color: #9aa0b4; display: flex; align-items: center; gap: 8px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.badge-admin { background: #f59e0b; color: #000; }
.badge-super { background: #dc2626; color: #fff; }
.badge-user { background: #4ade80; color: #000; }

/* 页面头 */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 600; margin: 0; }

/* Tab 标签栏 */
.tab-bar {
  display: flex; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; padding-bottom: 4px;
}
.tab-item {
  padding: 6px 16px; background: rgba(255,255,255,0.05);
  border-radius: 20px; cursor: pointer; font-size: 14px;
  white-space: nowrap; transition: all 0.2s;
}
.tab-item:hover { background: rgba(255,255,255,0.1); }
.tab-item.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

/* 帖子卡片（攻略/战报通用） */
.guide-list { display: flex; flex-direction: column; gap: 12px; }
.post-card {
  background: rgba(255,255,255,0.04); border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.06);
}
.post-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(102,126,234,0.3);
  transform: translateY(-1px);
}
.post-image {
  width: 100%; max-height: 200px; overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 12px 16px; }
.post-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 12px;
}
.post-tag {
  background: rgba(102,126,234,0.2); color: #a5b4fc;
  padding: 2px 8px; border-radius: 10px; font-size: 12px;
}
.post-tag.tag-battle {
  background: rgba(239,68,68,0.2); color: #fca5a5;
}
.post-author { color: #9ca3af; }
.post-title {
  font-size: 16px; font-weight: 600; margin-bottom: 6px;
  line-height: 1.4;
}
.post-excerpt {
  font-size: 13px; color: #9ca3af; line-height: 1.5;
  margin-bottom: 10px;
}
.post-stats {
  display: flex; gap: 16px; font-size: 12px; color: #9ca3af;
}
.like-btn {
  cursor: pointer; color: #9ca3af; transition: color 0.2s;
}
.like-btn:hover { color: #f472b6; }
.like-btn.liked { color: #ec4899; }

/* 详情页 */
.detail-body { max-width: 100%; }
.detail-title {
  font-size: 18px; margin: 8px 0 12px; line-height: 1.4;
}
.detail-image {
  width: 100%; margin-bottom: 16px; border-radius: 8px;
  overflow: hidden;
}
.detail-image img { width: 100%; display: block; }
.detail-content {
  font-size: 14px; line-height: 1.7; color: #e5e7eb;
  word-break: break-word;
}
.detail-actions {
  display: flex; gap: 8px; margin-top: 16px;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08);
}

/* 搜索行 */
.search-row { display: flex; gap: 8px; align-items: center; justify-content: center; }
.search-row .form-input {
  flex: 0 1 auto;
  max-width: 200px;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 14px;
  height: 38px;
}
.search-row .btn {
  flex-shrink: 0;
  width: auto;
  padding: 0 16px;
  height: 38px;
  font-size: 13px;
  border-radius: 10px;
}

/* 小屏幕适配 */
@media (max-width: 380px) {
  .search-row .form-input { max-width: 160px; min-width: 100px; font-size: 13px; }
  .search-row .btn { padding: 0 12px; font-size: 12px; }
}

/* 图片预览 */
.img-preview {
  margin-top: 8px; max-width: 200px;
}
.img-preview img {
  width: 100%; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* 拒绝原因 */
.reject-reason {
  font-size: 12px; color: #fca5a5;
  padding: 6px 12px; background: rgba(239,68,68,0.1);
  border-radius: 6px; margin-top: -4px;
}

.muted { color: #9ca3af; font-size: 13px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* 国库流水 */
.treasury-logs { display: flex; flex-direction: column; gap: 8px; }
.log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.log-item:last-child { border-bottom: none; }
.log-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: bold; flex-shrink: 0;
}
.log-icon-in { background: rgba(34,197,94,0.15); color: #22c55e; }
.log-icon-out { background: rgba(239,68,68,0.15); color: #ef4444; }
.log-icon-del { background: rgba(156,163,175,0.15); color: #9ca3af; }
.log-main { flex: 1; min-width: 0; }
.log-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; margin-bottom: 2px;
}
.log-type {
  font-size: 11px; padding: 1px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px; font-weight: normal; color: #9ca3af;
}
.log-sub {
  display: flex; gap: 10px; font-size: 12px; color: #6b7280;
}
.log-time { color: #6b7280; }
.log-remark {
  font-size: 12px; color: #9ca3af; margin-top: 4px;
  background: rgba(255,255,255,0.03);
  padding: 4px 8px; border-radius: 4px;
}
.log-qty {
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.log-in { color: #22c55e; }
.log-out { color: #ef4444; }
.log-del { color: #9ca3af; }

.page { padding: 16px; padding-bottom: 24px; }

/* ======== 首页 ======== */
.welcome-card {
  background: linear-gradient(135deg, rgba(102,126,234,0.3), rgba(118,75,162,0.3));
  border-radius: 16px; padding: 20px; margin-bottom: 20px;
  border: 1px solid rgba(102,126,234,0.3);
}
.welcome-card h2 { font-size: 18px; margin-bottom: 8px; }
.welcome-card p { color: #b0b4c4; font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 16px;
}
.stat-card .label { font-size: 12px; color: #9aa0b4; margin-bottom: 4px; }
.stat-card .value { font-size: 24px; font-weight: 700; color: #667eea; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.feature-item {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 18px 14px; text-align: center; transition: transform 0.15s, border-color 0.15s;
  cursor: pointer;
}
.feature-item:active { transform: scale(0.96); border-color: #667eea; }
.feature-item .f-icon { font-size: 28px; margin-bottom: 8px; }
.feature-item .f-name { font-size: 13px; font-weight: 600; }
.feature-item .f-desc { font-size: 11px; color: #9aa0b4; margin-top: 4px; }

/* ======== 列表 ======== */
.section-title { font-size: 15px; font-weight: 600; margin: 16px 0 10px; color: #9aa0b4; text-transform: uppercase; letter-spacing: 1px; }
.list-item {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.list-item .row { display: flex; justify-content: space-between; align-items: center; }
.list-item .title { font-weight: 600; font-size: 14px; }
.list-item .sub { color: #9aa0b4; font-size: 12px; margin-top: 4px; }
.list-item .tag {
  padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.tag-pending { background: rgba(245,158,11,0.2); color: #f59e0b; }
.tag-confirmed { background: rgba(74,222,128,0.2); color: #4ade80; }
.tag-rejected { background: rgba(248,113,113,0.2); color: #f87171; }

.empty { text-align: center; padding: 48px 16px; color: #9aa0b4; }
.empty .e-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ======== 底部 TabBar ======== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(22, 33, 62, 0.95); backdrop-filter: blur(20px);
  display: flex; border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 12px; gap: 3px; color: #5a5f72;
  transition: color 0.2s;
}
.tab-btn.active { color: #667eea; }
.tab-btn .icon { font-size: 20px; }
.tab-btn .label { font-size: 11px; font-weight: 600; }

/* ======== 模态框 ======== */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-box {
  position: relative; width: 100%; max-width: 480px; max-height: 85vh; overflow: hidden;
  background: #1a1a2e; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.9); } }
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { font-size: 18px; color: #9aa0b4; padding: 4px 8px; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; gap: 10px; }
.modal-footer .btn { flex: 1; }

/* ======== 按钮组 ======== */
.btn-group { display: flex; gap: 8px; margin-top: 8px; }
.btn-group .btn { flex: 1; }

/* ======== 操作栏 ======== */
.action-bar {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.action-bar .btn { flex: 1; }

/* ======== 表单区域 ======== */
.form-section { margin-bottom: 20px; }

/* ======== 电脑端适配 ======== */
@media (min-width: 768px) {
  body { padding-bottom: 0; max-width: 800px; margin: 0 auto; padding-top: 0; }
  .tabbar { max-width: 800px; left: 50%; transform: translateX(-50%); }
  .page { padding: 20px 24px; }
}
@media (min-width: 1024px) {
  body { max-width: 1000px; }
  .tabbar { max-width: 1000px; }
}


/* ===== 赛事规则 ===== */
.tournament-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  margin: 0 -16px 16px;
  -webkit-overflow-scrolling: touch;
}
.tournament-tabs::-webkit-scrollbar { display: none; }
.tournament-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 13px;
  color: #9ca3af;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.tournament-tab.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: transparent;
  font-weight: 500;
}
.tournament-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tournament-table thead th {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  padding: 10px 8px;
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}
.tournament-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
  line-height: 1.5;
}
.tournament-table tr.even td { background: rgba(255,255,255,0.02); }
.tournament-table tr.odd td { background: transparent; }



/* ===== 赛事管理 ===== */
.tournament-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.tournament-item:active { transform: scale(0.98); }
.tournament-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.tournament-title { font-size: 15px; font-weight: 600; color: #fbbf24; }
.tournament-status {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
}
.status-draft { background: rgba(156,163,175,0.15); color: #9ca3af; }

/* ===== 下载页 ===== */
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }

.download-navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: rgba(22,33,62,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo { display: flex; align-items: center; gap: 8px; }
.nav-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.nav-logo-icon { font-size: 22px; }
.nav-logo-text { font-size: 16px; font-weight: 700; color: #fbbf24; }
.nav-actions { display: flex; gap: 8px; }

.download-hero {
  padding: 50px 20px 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(99,102,241,0.15) 0%, transparent 100%);
}
.hero-badge {
  display: inline-block;
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}
.hero-desc {
  font-size: 14px;
  color: #94a3b8;
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 12px;
}

.download-section {
  padding: 32px 20px;
}
.section-heading {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0 0 8px;
}
.section-sub {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  margin: 0 0 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.feature-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  transition: transform .15s, border-color .15s;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251,191,36,0.4);
}
.feature-icon { font-size: 32px; margin-bottom: 8px; }
.feature-title { font-size: 14px; font-weight: 600; color: #fbbf24; margin: 0 0 6px; }
.feature-desc { font-size: 12px; color: #94a3b8; line-height: 1.5; margin: 0; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.download-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
}
.download-icon { font-size: 40px; margin-bottom: 10px; }
.download-plat { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 14px; }
.download-btn {
  display: inline-block;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}
.download-hint { font-size: 11px; color: #64748b; margin: 0; }

.download-footer {
  text-align: center;
  padding: 24px 20px 40px;
  color: #475569;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* 桌面端优化 */
@media (min-width: 768px) {
  .download-hero { padding: 70px 20px 50px; }
  .hero-title { font-size: 36px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); max-width: 800px; }
  .download-grid { grid-template-columns: repeat(3, 1fr); max-width: 800px; }
}
.status-signup { background: rgba(59,130,246,0.15); color: #60a5fa; }
.status-ongoing { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-finished { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-cancelled { background: rgba(239,68,68,0.15); color: #f87171; }
.tournament-meta {
  display: flex; gap: 12px; font-size: 12px; color: #9ca3af; margin-bottom: 4px;
}
.tournament-desc {
  font-size: 13px; color: #d1d5db; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tournament-info { background: rgba(0,0,0,0.15); border-radius: 10px; padding: 12px; }
.info-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: #9ca3af; }
.info-row span:last-child { color: #e5e7eb; font-weight: 500; }
.tournament-points-row {
  display: grid; grid-template-columns: 1fr 70px 60px 70px 70px;
  gap: 8px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tp-user { min-width: 0; }
.tp-user div { font-size: 13px; color: #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-user small { font-size: 11px; color: #6b7280; }
.tp-points, .tp-rank, .tp-reward, .tp-remark {
  padding: 6px 8px !important; font-size: 12px !important;
}



/* ======== 积分商城 ======== */
.mall-banner {
  position: relative;
  padding: 20px 16px 16px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
}
.mall-banner-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
  z-index: 0;
}
.mall-banner-content {
  position: relative;
  z-index: 1;
  color: #fff;
}
.mall-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 4px;
}
.mall-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 16px;
}
.mall-points {
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}
.mall-points-label { font-size: 13px; opacity: 0.9; }
.mall-points-value { font-size: 24px; font-weight: bold; }

.mall-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px 80px;
}
.mall-card {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.mall-card:active { transform: scale(0.97); }
.mall-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}
.mall-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mall-emoji { font-size: 48px; }
.mall-card-body { padding: 10px; }
.mall-card-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mall-card-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  min-height: 30px;
}
.mall-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mall-price {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #f59e0b;
  font-weight: bold;
}
.mall-price-icon { font-size: 14px; }
.mall-price-num { font-size: 16px; }
.mall-stock {
  font-size: 11px;
  color: #64748b;
}

/* 电脑端商城适配 */
@media (min-width: 768px) {
  .mall-grid { grid-template-columns: repeat(3, 1fr); padding: 0 24px 80px; gap: 16px; }
}
@media (min-width: 1024px) {
  .mall-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ======== 福利祈愿池（抽奖） ======== */
.lottery-entry {
  margin: 0 12px 12px;
  background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: 1px solid #4338ca;
  transition: transform 0.2s;
}
.lottery-entry:active { transform: scale(0.98); }
.lottery-entry-left { display: flex; align-items: center; gap: 12px; }
.lottery-entry-icon { font-size: 36px; }
.lottery-entry-title { font-size: 15px; font-weight: bold; color: #fff; }
.lottery-entry-desc { font-size: 12px; color: #a5b4fc; margin-top: 2px; }
.lottery-entry-arrow { font-size: 12px; color: #fbbf24; font-weight: bold; }

.lottery-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #701a75 100%);
  margin: 0;
  padding: 16px;
  color: #fff;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}
.lottery-pool-name { font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 4px; }
.lottery-pool-desc { font-size: 12px; text-align: center; opacity: 0.7; margin-bottom: 14px; }
.lottery-info-row { display: flex; justify-content: space-around; margin-bottom: 12px; }
.lottery-info-item { text-align: center; }
.lottery-info-label { font-size: 11px; opacity: 0.7; margin-bottom: 2px; }
.lottery-info-value { font-size: 18px; font-weight: bold; }
.lottery-points-color { color: #fbbf24; }

.lottery-pity-bar { background: rgba(255,255,255,0.1); border-radius: 10px; padding: 10px 12px; }
.lottery-pity-text { font-size: 12px; margin-bottom: 6px; text-align: center; }
.lottery-pity-num { color: #fbbf24; font-weight: bold; font-size: 14px; }
.lottery-pity-progress { height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.lottery-pity-fill { height: 100%; background: linear-gradient(90deg, #fbbf24, #f59e0b); border-radius: 3px; transition: width 0.3s; }

/* 转盘 */
.wheel-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 20px auto;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(from 0deg, #1e293b, #334155, #1e293b);
  border: 4px solid #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.3), inset 0 0 20px rgba(0,0,0,0.5);
}
.wheel-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: radial-gradient(circle, #fbbf24, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.wheel-star { font-size: 28px; }
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  color: #ef4444;
  z-index: 20;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.wheel-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 0%, 75% 0%);
  transform-origin: 50% 50%;
}
.wheel-segment.rarity-legendary { background: linear-gradient(180deg, #fbbf24, #d97706); }
.wheel-segment.rarity-epic { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.wheel-segment.rarity-fine { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.wheel-segment.rarity-common { background: linear-gradient(180deg, #6b7280, #4b5563); }
.wheel-segment-content {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: center bottom;
  text-align: center;
  color: #fff;
  width: 60px;
  margin-left: -30px;
}
.wheel-reward-icon { font-size: 24px; margin-bottom: 2px; }
.wheel-reward-name { font-size: 10px; font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }

/* 抽奖按钮 */
.lottery-btn-row {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 12px;
  justify-content: center;
}
.lottery-btn {
  flex: 1;
  max-width: 160px;
  padding: 14px 12px;
  border-radius: 14px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}
.lottery-btn:active { transform: scale(0.95); }
.lottery-btn-title { font-size: 15px; font-weight: bold; margin-bottom: 2px; }
.lottery-btn-cost { font-size: 12px; opacity: 0.9; }
.lottery-btn-ten {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 功能入口行 */
.lottery-func-row {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.lottery-func-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.lottery-func-btn:active { background: #334155; }

/* 稀有度徽章 */
.lottery-rarity-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
}
.rarity-legendary { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; }
.rarity-epic { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }
.rarity-fine { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }
.rarity-common { background: #4b5563; color: #fff; }

/* 奖励列表 */
.lottery-reward-list { padding: 0 12px 80px; }
.lottery-reward-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #1e293b;
  border-radius: 10px;
  margin-bottom: 8px;
  border-left: 3px solid #334155;
}
.lottery-reward-item.rarity-legendary { border-left-color: #fbbf24; }
.lottery-reward-item.rarity-epic { border-left-color: #a78bfa; }
.lottery-reward-item.rarity-fine { border-left-color: #60a5fa; }
.lottery-reward-item.rarity-common { border-left-color: #6b7280; }
.lottery-reward-icon { font-size: 28px; }
.lottery-reward-info { flex: 1; min-width: 0; }
.lottery-reward-name { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 3px; }
.lottery-reward-meta { font-size: 11px; color: #94a3b8; }
.lottery-reward-stock { font-size: 11px; color: #64748b; }
.tag-up { background: #ec4899; color: #fff; font-size: 10px; padding: 1px 5px; }

/* 抽奖结果弹窗 */
.draw-result-body { text-align: center; padding: 10px 0; }
.draw-result-single {
  position: relative;
  padding: 30px 20px;
  border-radius: 16px;
  margin: 10px 0;
  overflow: hidden;
}
.draw-result-single.rarity-legendary { background: linear-gradient(135deg, #78350f, #fbbf24, #78350f); background-size: 200% 200%; animation: shine 2s ease-in-out infinite; }
.draw-result-single.rarity-epic { background: linear-gradient(135deg, #4c1d95, #a78bfa, #4c1d95); background-size: 200% 200%; animation: shine 2s ease-in-out infinite; }
.draw-result-single.rarity-fine { background: linear-gradient(135deg, #1e3a8a, #60a5fa, #1e3a8a); background-size: 200% 200%; }
.draw-result-single.rarity-common { background: #1e293b; }
@keyframes shine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.draw-result-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; } 50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; } }
.draw-result-icon { font-size: 64px; position: relative; z-index: 1; margin-bottom: 10px; }
.draw-result-name { font-size: 18px; font-weight: bold; color: #fff; position: relative; z-index: 1; margin-bottom: 6px; }
.draw-result-rarity { font-size: 13px; color: rgba(255,255,255,0.9); position: relative; z-index: 1; }
.draw-result-frag { font-size: 12px; color: #fbbf24; margin-top: 6px; position: relative; z-index: 1; }
.draw-result-pity { font-size: 14px; color: #fbbf24; font-weight: bold; margin-top: 10px; position: relative; z-index: 1; }

.draw-result-title { font-size: 18px; font-weight: bold; margin-bottom: 16px; color: #fff; }
.draw-result-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.draw-result-item {
  position: relative;
  padding: 10px 4px;
  border-radius: 8px;
  text-align: center;
  background: #1e293b;
  border: 1px solid #334155;
}
.draw-result-item.rarity-legendary { border-color: #fbbf24; background: linear-gradient(180deg, #78350f, #1e293b); }
.draw-result-item.rarity-epic { border-color: #a78bfa; background: linear-gradient(180deg, #4c1d95, #1e293b); }
.draw-result-item.rarity-fine { border-color: #60a5fa; background: linear-gradient(180deg, #1e3a8a, #1e293b); }
.draw-result-item-icon { font-size: 24px; margin-bottom: 4px; }
.draw-result-item-name { font-size: 10px; color: #cbd5e1; }
.draw-result-pity-mini { position: absolute; top: 2px; right: 2px; font-size: 9px; background: #f59e0b; color: #fff; padding: 1px 3px; border-radius: 3px; }

/* 概率公示 */
.prob-title { font-size: 15px; font-weight: bold; margin-bottom: 8px; color: #fff; }
.prob-tip { font-size: 11px; color: #94a3b8; margin-bottom: 12px; }
.prob-table { display: flex; flex-direction: column; gap: 6px; }
.prob-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #1e293b; border-radius: 8px; }
.prob-rarity { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: bold; color: #fff; }
.prob-value { font-size: 14px; font-weight: bold; color: #fbbf24; }
.prob-rules { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #94a3b8; line-height: 1.6; }

/* 碎片仓库 */
.frag-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 12px 8px;
  background: #1e293b;
  border-radius: 12px;
  border-left: 3px solid #334155;
}
.frag-card.rarity-legendary { border-left-color: #fbbf24; }
.frag-card.rarity-epic { border-left-color: #a78bfa; }
.frag-card.rarity-fine { border-left-color: #60a5fa; }
.frag-icon { font-size: 36px; }
.frag-info { flex: 1; min-width: 0; }
.frag-name { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.frag-count { font-size: 12px; color: #fbbf24; margin-bottom: 6px; }
.frag-progress { height: 4px; background: #334155; border-radius: 2px; overflow: hidden; }
.frag-progress-fill { height: 100%; background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width 0.3s; }

/* 电脑端适配 */
@media (min-width: 768px) {
  .lottery-header { border-radius: 0; }
  .wheel-container { width: 320px; height: 320px; }
  .lottery-btn { max-width: 200px; padding: 18px 16px; }
  .lottery-btn-title { font-size: 17px; }
  .lottery-reward-list { padding: 0 24px 80px; }
}


/* 图片上传组件 */
.img-upload-zone {
  border: 2px dashed #475569;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: #1e293b;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}
.img-upload-zone:hover { border-color: #667eea; background: #263346; }
.img-upload-icon { font-size: 32px; margin-bottom: 6px; }
.img-upload-text { font-size: 13px; color: #cbd5e1; font-weight: 500; margin-bottom: 4px; }
.img-upload-sub { font-size: 11px; color: #64748b; }

.img-upload-preview {
  position: relative;
  margin-top: 6px;
  text-align: center;
}
.img-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid #334155;
  object-fit: contain;
  background: #1e293b;
}
.img-preview-change {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
}

/* 奖励列表图片 */
.lottery-reward-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
}

/* 转盘奖励图片 */
.wheel-reward-img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 2px;
}


/* 个人中心菜单 */
.profile-menu {
  background: #1e293b;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: #263346; }
.profile-menu-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  flex-shrink: 0;
}
.profile-menu-info { flex: 1; min-width: 0; }
.profile-menu-label { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.profile-menu-desc { font-size: 12px; color: #94a3b8; }
.profile-menu-arrow {
  font-size: 20px;
  color: #64748b;
  flex-shrink: 0;
}


/* 微信绑定 */
.wechat-bind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 12px;
  background: #1e293b;
  border-radius: 10px;
  border: 1px solid #334155;
}
.wechat-openid-display {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.wechat-bound-icon, .wechat-unbound-icon { font-size: 16px; }
.wechat-openid-text {
  font-size: 13px;
  color: #cbd5e1;
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}


/* 首页用户卡 */
.home-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-user-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(251,191,36,0.15), transparent 70%);
  border-radius: 50%;
}
.home-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.home-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fbbf24;
  background: #334155;
}
.home-avatar-default {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #475569, #334155);
}
.home-badge-ring {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 22px; height: 22px;
  background: #fbbf24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid #0f172a;
}
.home-user-info {
  flex: 1;
  min-width: 0;
  z-index: 1;
}
.home-user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}
.home-crown { font-size: 16px; margin-left: 4px; }
.home-user-badge {
  font-size: 12px;
  color: #fbbf24;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.badge-icon { font-size: 14px; }
.home-user-desc {
  font-size: 12px;
  color: #94a3b8;
}
.home-user-points {
  text-align: right;
  flex-shrink: 0;
  z-index: 1;
}
.home-points-label {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}
.home-points-value {
  font-size: 20px;
  font-weight: bold;
  color: #fbbf24;
}

/* 首页栏目 */
.home-section {
  margin-bottom: 16px;
}
.section-more {
  font-size: 12px;
  color: #64748b;
  font-weight: normal;
  float: right;
  cursor: pointer;
}

/* 帖子列表 */
.post-list { padding: 0 0 4px; }
.post-item {
  padding: 12px 14px;
  background: #1e293b;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.post-item:active { background: #263346; }
.post-item.post-top { border-left: 3px solid #ef4444; }
.post-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.post-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-item-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #64748b;
}
.tag-top {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* 公告列表样式 */
.announce-list {
  padding: 0;
}
.announce-list .post-item {
  background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(251,191,36,0.05));
  border: 1px solid rgba(239,68,68,0.2);
}

/* 帖子详情 */
.post-detail {
  padding: 16px;
  background: #1e293b;
  border-radius: 12px;
  margin-bottom: 16px;
}
.post-detail-title {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-detail-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
  margin-bottom: 14px;
}
.post-detail-content { color: #cbd5e1; line-height: 1.7; font-size: 14px; }
.post-text { white-space: pre-wrap; }
.post-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.post-image {
  width: 100%;
  border-radius: 8px;
  max-height: 400px;
  object-fit: contain;
  background: #0f172a;
}

/* 发帖图片上传 */
.post-upload-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.post-upload-img-item {
  position: relative;
  width: 70px; height: 70px;
  border-radius: 8px;
  overflow: hidden;
}
.post-upload-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.post-upload-img-del {
  position: absolute;
  top: 2px; right: 2px;
  background: rgba(239,68,68,0.9);
  color: #fff;
  font-size: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.post-upload-add {
  width: 70px; height: 70px;
  border: 2px dashed #475569;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  background: #1e293b;
}
.post-upload-add:active { background: #263346; }

.empty-tip-small {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}
