:root {
  --bg: #0b0f1a;
  --panel: #151c2c;
  --panel-2: #1d2638;
  --line: #263149;
  --text: #e8edf7;
  --text2: #8e9bb5;
  --gold: #e8b45a;
  --gold-2: #f5d18a;
  --red: #ff5c5c;
  --green: #35c46b;
  --blue: #4c8dff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #06080f; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  display: flex;
  justify-content: center;
}
.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: radial-gradient(120% 60% at 50% 0%, #1b2540 0%, var(--bg) 45%, #070a12 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hidden { display: none !important; }

.topbar {
  padding: 16px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.user-entry {
  font-size: 12px;
  color: var(--text2);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
}

.page { flex: 1; padding: 0 16px 90px; overflow-y: auto; }
.tabbar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 6px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10,14,24,.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.tab {
  flex: 1;
  padding: 10px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
}
.tab.active { color: #14192a; background: linear-gradient(135deg, var(--gold-2), var(--gold)); font-weight: 700; }

.search {
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text2);
  background: rgba(255,255,255,.02);
}
.chip.on { color: #14192a; background: var(--gold); border-color: var(--gold); font-weight: 600; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 10px; font-size: 13px; color: var(--text2); letter-spacing: 1px;
}
.section-title b { color: var(--text); font-size: 15px; }

.card {
  position: relative;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-2), transparent);
}
.card-head { display: flex; align-items: center; gap: 8px; }
.card-name { font-size: 15px; font-weight: 700; }
.badge {
  font-size: 10px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--gold); color: var(--gold);
}
.badge.vip { border-color: var(--red); color: var(--red); }
.badge.off { border-color: var(--line); color: var(--text2); }
.card-meta { margin-top: 8px; font-size: 12px; color: var(--text2); display: flex; gap: 12px; flex-wrap: wrap; }
.card-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; color: #a9b7d3; background: rgba(76,141,255,.1); border: 1px solid rgba(76,141,255,.25); padding: 3px 8px; border-radius: 6px; }
.card-actions { margin-top: 12px; display: flex; gap: 10px; }
.btn {
  border: 0; border-radius: 11px; padding: 10px 18px; font-size: 13px; font-weight: 600;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
}
.btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #14192a; border-color: transparent; }
.btn.block { width: 100%; padding: 13px; font-size: 15px; }
.btn:disabled { opacity: .5; }

.empty { text-align: center; color: var(--text2); font-size: 13px; padding: 40px 0; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-panel {
  position: relative; width: 100%; max-width: 480px; max-height: 86vh; overflow-y: auto;
  background: var(--panel); border-radius: 20px 20px 0 0; padding: 18px 18px 26px;
  border-top: 1px solid var(--line); animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: .4; } }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--gold); }
.form-tip { font-size: 11px; color: var(--text2); margin-bottom: 12px; }
.form-switch { text-align: center; font-size: 12px; color: var(--text2); margin-top: 14px; }
.form-switch b { color: var(--gold); }

.launch-box {
  background: #0a0f18; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  color: #9fb2d0; white-space: pre-wrap; word-break: break-all; max-height: 210px; overflow: auto;
}
.hint { font-size: 12px; color: var(--text2); line-height: 1.7; margin: 10px 0; }

/* 公告 */
.notice-card {
  border: 1px solid rgba(232,180,90,.3);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(232,180,90,.1), rgba(232,180,90,.02));
}
.notice-title { font-size: 14px; font-weight: 700; color: var(--gold-2); }
.notice-body { margin-top: 6px; font-size: 13px; color: #c7d3e8; line-height: 1.6; white-space: pre-wrap; }
.notice-time { margin-top: 6px; font-size: 11px; color: var(--text2); }

/* 我的 */
.profile { display: flex; align-items: center; gap: 14px; padding: 18px 0 6px; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #2a3550, #1a2233); border: 1px solid var(--line);
  font-size: 20px; color: var(--gold);
}
.profile-name { font-size: 16px; font-weight: 700; }
.profile-sub { font-size: 12px; color: var(--text2); margin-top: 4px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.list-item span:last-child { color: var(--text2); font-size: 12px; }

/* 社区 */
.post { border-bottom: 1px solid var(--line); padding: 14px 0; }
.post-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); }
.post-body { margin: 8px 0; font-size: 14px; line-height: 1.6; }
.post-foot { display: flex; gap: 16px; font-size: 12px; color: var(--text2); }
.comment { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 12px; color: #b9c6dd; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(20,25,40,.96); border: 1px solid var(--line); color: var(--text);
  padding: 11px 18px; border-radius: 12px; font-size: 13px; z-index: 90; max-width: 84%;
  white-space: pre-wrap; text-align: center; line-height: 1.6;
}
