/* ============================================
   遇影社团 - 完整页面样式 v3
   覆盖: 商城/消息/管理员/个人中心/成员/论坛/心愿单
   ============================================ */

/* ===== CSS 变量定义（供 admin.html 标签编辑器等内联样式使用）===== */
:root {
  --color-bg: #0d0d0d;
  --color-bg-2: #111111;
  --color-bg-3: #1a1a1a;
  --color-bg-card: #161616;
  --color-surface: #1a1a1a;
  --color-border: rgba(255,255,255,0.08);
  --color-text: #f5f5f5;
  --color-text-muted: #666666;
  --color-primary: #c9a96e;
  --color-primary-dark: #a67c3e;
}

/* ===== 全局重置补充 ===== */
.page-section { padding: 50px 0; min-height: 60vh; }
.page-section > .container { max-width: 960px; }
.page-title { font-size: 1.5rem; font-weight: 600; color: #f5f5f5; margin-bottom: 20px; }
.page-card {
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 32px; margin-bottom: 24px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}
.section-tag { font-size: 0.7rem; color: #909090; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-size: 1.5rem; font-weight: 600; color: #f5f5f5; margin-bottom: 8px; }
.section-subtitle { color: #888; font-size: 0.88rem; max-width: 520px; margin: 0 auto; line-height: 1.7; }
.section-divider { width: 36px; height: 2px; background: #c9a96e; margin: 10px auto; }

/* ===== 导航增强 ===== */
.nav-inner { height: 44px; }
.logo-mark { width: 28px; height: 28px; border-radius: 4px; }
.nav-admin-link a { color: #c9a96e !important; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #707070; }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.6; }
.empty-state p { font-size: 1rem; color: #707070; }

/* ===== 按钮增强 ===== */
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 6px; }

/* ================================================================
   商城页面 (shop.html)
   ================================================================ */
.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media(min-width: 900px) {
  .shop-layout { grid-template-columns: 1fr 280px; }
}
.shop-main { min-width: 0; }

/* 商城侧边栏 */
.inventory-panel {
  background: #161616;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  height: fit-content;
  position: sticky;
  top: 70px;
}
.inv-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1a1a2e, #161616);
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.inv-panel-title { flex: 1; font-weight: 600; font-size: 0.9rem; color: #f5f5f5; }
.inv-panel-count {
  background: #c9a96e; color: #000;
  padding: 2px 10px; border-radius: 10px;
  font-size: 0.75rem; font-weight: 700;
}
.inv-panel-arrow { transition: transform 0.3s; color: #909090; }
.inventory-panel.collapsed .inv-panel-arrow { transform: rotate(180deg); }
.inv-collapsed-label {
  display: none;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.85rem; color: #aaa;
  background: #161616;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.inventory-panel.collapsed .inv-panel-body { display: none; }
.inventory-panel.collapsed .inv-collapsed-label { display: block; }
.inventory-panel.collapsed .inv-panel-header { display: none; }

.inv-panel-body { padding: 12px; max-height: 60vh; overflow-y: auto; }
.inv-sidebar-empty { text-align: center; padding: 30px 16px; color: #707070; font-size: 0.85rem; line-height: 1.7; }
.inv-sidebar-section-title {
  font-size: 0.72rem; color: #909090;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 8px 6px; font-weight: 600;
}
.inv-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.2s;
  color: #b0b0b0; font-size: 0.85rem;
  border: 1px solid transparent;
}
.inv-sidebar-item:hover { background: #1e1e1e; }
.inv-sidebar-item.active { background: rgba(201,169,110,0.08); color: #c9a96e; border-color: rgba(201,169,110,0.15); }
.inv-sidebar-dot { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; }
.inv-sidebar-dot.golden_crown { background: linear-gradient(135deg,#ffd700,#ffaa00); }
.inv-sidebar-dot.shadow_wings { background: linear-gradient(135deg,#4a0080,#8000ff); }
.inv-sidebar-dot.star_ring { background: linear-gradient(135deg,#ffd700,#ffec8b); }
.inv-sidebar-dot.phoenix_flame { background: linear-gradient(135deg,#ff4500,#ff8c00); }
.inv-sidebar-activate {
  padding: 3px 10px; border-radius: 4px;
  background: rgba(80,200,255,0.1); color: #50c8ff;
  font-size: 0.72rem; cursor: pointer;
  border: none; flex-shrink: 0;
}

/* 商城头部统计 */
.coins-balance-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; margin-bottom: 20px;
}
.coins-balance-icon { font-size: 1.5rem; }
.coins-balance-value { font-size: 1.4rem; font-weight: 700; color: #f0c060; }
.coins-balance-label { font-size: 0.72rem; color: #707070; }

/* Tab 切换 */
.tabs {
  display: flex; gap: 4px;
  flex-wrap: wrap; margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0;
}
.tab-btn {
  padding: 10px 18px; border-radius: 8px 8px 0 0;
  font-size: 0.85rem; font-weight: 500;
  color: #888; background: transparent;
  border: none; cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: #bbb; background: rgba(255,255,255,0.03); }
.tab-btn.active { color: #c9a96e; border-bottom-color: #c9a96e; background: rgba(201,169,110,0.05); }

/* 商品网格 */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media(min-width: 480px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }

.shop-card {
  background: #161616;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.shop-card:hover {
  border-color: rgba(201,169,110,0.3);
  box-shadow: 0 4px 20px rgba(201,169,110,0.1);
  transform: translateY(-3px);
}

.shop-card-code { font-size: 0.72rem; color: #666; margin-bottom: 8px; letter-spacing: 0.5px; }
.wishlist-btn {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; font-size: 1.2rem;
  cursor: pointer; opacity: 0.4; transition: all 0.2s;
}
.wishlist-btn:hover { opacity: 0.8; transform: scale(1.15); }
.wishlist-btn.active { opacity: 1; }

.shop-card-frame-preview {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.04);
}
.shop-card-preview-bg {
  width: 100%; aspect-ratio: 16/9; border-radius: 8px;
  overflow: hidden; margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.04);
  background-size: cover; background-position: center;
}
.shop-card-preview-tag {
  padding: 8px 16px; border-radius: 6px;
  text-align: center; font-size: 0.85rem;
  display: inline-block;
}

.shop-card-name { font-size: 1rem; font-weight: 600; color: #f5f5f5; margin-bottom: 6px; }
.shop-card-desc { font-size: 0.82rem; color: #777; line-height: 1.6; margin-bottom: 14px; }
.shop-card-price {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 14px; color: #c9a96e; font-weight: 700; font-size: 1.05rem;
}

.shop-btn-row { display: flex; gap: 8px; margin-top: 12px; }
.shop-btn {
  flex: 1; padding: 9px 14px; border-radius: 8px;
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: center; border: none;
}
.shop-btn.buy { background: #c9a96e; color: #000; }
.shop-btn.buy:hover { opacity: 0.9; }
.shop-btn.buy:disabled { opacity: 0.35; cursor: not-allowed; }
.shop-btn.owned { background: rgba(80,200,255,0.1); color: #50c8ff; }
.shop-btn.owned:hover { background: rgba(80,200,255,0.18); }
.shop-btn.active { background: #333; color: #888; cursor: default; }
.shop-btn.gift { background: rgba(255,255,255,0.05); color: #bbb; border: 1px solid rgba(255,255,255,0.08); }
.shop-btn.gift:hover { border-color: rgba(255,255,255,0.2); color: #ddd; }

.game-code-card { /* same as shop-card basically */ }
.game-code-icon { font-size: 2.5rem; }

/* 兑换区域 */
.exchange-section {
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.exchange-input-row { display: flex; gap: 8px; margin-top: 12px; }
.exchange-input {
  flex: 1; padding: 10px 14px; border-radius: 8px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5; font-size: 0.9rem; outline: none; font-family: inherit;
}
.exchange-input:focus { border-color: #c9a96e; }
.exchange-btn {
  padding: 10px 22px; border-radius: 8px;
  background: #c9a96e; color: #000; font-weight: 600;
  cursor: pointer; border: none; white-space: nowrap;
}
.exchange-hint { font-size: 0.82rem; color: #888; margin-top: 8px; }

.redeem-box {
  background: #161616; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 24px; margin-top: 16px;
}

/* 交易记录表格 */
.history-section { margin-top: 16px; }
.history-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.history-table th {
  padding: 10px 14px; text-align: left; font-weight: 600;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: #707070; border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.history-table td {
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.tx-type {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 500;
}
.tx-type.signin { background: rgba(93,190,126,0.15); color: #5dbe7e; }
.tx-type.exchange { background: rgba(165,94,234,0.15); color: #a55eea; }
.tx-type.purchase { background: rgba(201,169,110,0.15); color: #c9a96e; }
.tx-type.gift_send { background: rgba(240,100,160,0.15); color: #f064a0; }
.tx-type.admin_add { background: rgba(80,200,255,0.15); color: #50c8ff; }
.tx-type.admin_deduct { background: rgba(255,80,80,0.15); color: #FF5050; }
.tx-type.redeem_code, .tx-type.redeem_item, .tx-type.redeem_game_code { background: rgba(100,180,100,0.15); color: #64b464; }
.tx-type.friend_score_gift { background: rgba(165,94,234,0.15); color: #a55eea; }
.tx-amount { font-weight: 600; }
.tx-amount.positive { color: #5dbe7e; }
.tx-amount.negative { color: #e85d3d; }

/* 赠送弹窗 */
.gift-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: 99999; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.gift-modal-overlay.open { opacity: 1; pointer-events: auto; }
.gift-modal {
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 28px; width: 90%; max-width: 420px;
}
.gift-modal h3 { font-size: 1.1rem; color: #f5f5f5; margin-bottom: 8px; }
.gift-modal label { display: block; font-size: 0.85rem; color: #bbb; margin: 12px 0 6px; }
.gift-modal select, .gift-modal textarea {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  background: #111; border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5; font-size: 0.88rem; outline: none; font-family: inherit;
}
.gift-modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }


/* ================================================================
   消息页面 (messages.html) - 聊天布局
   ================================================================ */
.chat-container {
  display: flex;
  height: calc(100vh - 52px);
  max-width: 1100px;
  margin: 0 auto;
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
@media(max-width: 768px) {
  .chat-container { height: calc(100vh - 52px); border-radius: 0; border-left: 0; border-right: 0; }
}

.chat-sidebar {
  width: 260px; min-width: 220px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  background: #0d0d0d;
}
@media(max-width: 768px) {
  .chat-sidebar {
    position: fixed; top: 52px; left: 0; bottom: 0; right: 0;
    z-index: 100; width: 100%;
    display: none;
  }
  .chat-sidebar.show { display: flex; }
}
.chat-sidebar-header {
  padding: 14px 18px;
  font-weight: 600; font-size: 0.9rem; color: #f5f5f5;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #141414;
  flex-shrink: 0;
}
.chat-conv-list { flex: 1; overflow-y: auto; }

/* 对话列表项 */
.chat-conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.chat-conv-item:hover { background: rgba(255,255,255,0.03); }
.chat-conv-item.active { background: rgba(201,169,110,0.08); }

.chat-conv-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: #222; color: #c9a96e;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 600; flex-shrink: 0;
  overflow: hidden;
}
.chat-conv-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ====== 消息页头像框（金色边框）====== */
.chat-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a96e, #a67c3e, #c9a96e);
  padding: 2px;
  box-shadow: 0 0 8px rgba(201,169,110,.2);
  overflow: visible !important;
}
.chat-avatar-frame .chat-conv-avatar,
.chat-avatar-frame .chat-header-avatar {
  border: none !important;
  box-shadow: none !important;
}
/* 聊天列表头像 - 直接加金环 */
.chat-conv-avatar {
  border-radius: 50% !important;
  outline: 2px solid #c9a96e;
  outline-offset: 1px;
  box-shadow: 0 0 8px rgba(201,169,110,.15);
}

.chat-conv-info { flex: 1; min-width: 0; }
.chat-conv-name { font-weight: 600; font-size: 0.88rem; color: #f5f5f5; }
.chat-conv-last { font-size: 0.78rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-badge {
  background: #e85d3d; color: #fff;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; padding: 0 5px;
  flex-shrink: 0;
}

/* 聊天主区域 */
.chat-main {
  flex: 1; display: flex; flex-direction: column;
  background:
    linear-gradient(135deg, rgba(201,169,110,0.03) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(201,169,110,0.02) 0%, transparent 30%),
    radial-gradient(ellipse at top right, rgba(201,169,110,0.04) 0%, transparent 60%),
    #0d0d0d;
  min-width: 0;
}
@media(max-width: 768px) {
  .chat-main { display: none; position: fixed; top: 52px; left: 0; right: 0; bottom: 0; z-index: 100; }
  .chat-main.show { display: flex; }
}
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #141414; flex-shrink: 0;
}
.chat-header-back {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: #bbb;
  border: none; cursor: pointer; font-size: 1rem;
}
@media(min-width: 769px) { .chat-header-back { display: none !important; } }
.chat-header-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #222; color: #c9a96e;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.chat-header-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-header-name { font-weight: 600; font-size: 0.95rem; color: #f5f5f5; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-auto-clean {
  text-align: center; font-size: 0.78rem; color: #888;
  padding: 8px; margin-bottom: 8px;
}

/* 聊天气泡 */
.chat-msg {
  max-width: 75%; padding: 10px 16px; border-radius: 16px;
  font-size: 0.9rem; line-height: 1.5; word-break: break-word;
}
.chat-msg.other {
  align-self: flex-start;
  background: #1e1e1e; color: #e0e0e0;
  border-bottom-left-radius: 4px;
}
.chat-msg.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #c9a96e, #a67c3e); color: #000;
  border-bottom-right-radius: 4px;
}
.chat-msg-time {
  font-size: 0.68rem; color: #666; margin-top: 4px;
  text-align: right;
}
.chat-msg.mine .chat-msg-time { color: rgba(0,0,0,0.4); }

/* 输入区域 */
.chat-input-area {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #141414; flex-shrink: 0;
}
.chat-input-area input {
  flex: 1; padding: 10px 16px; border-radius: 20px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f5; font-size: 0.9rem; outline: none; font-family: inherit;
}
.chat-input-area input:focus { border-color: #c9a96e; }
.chat-input-area button {
  padding: 10px 20px; border-radius: 20px;
  background: #c9a96e; color: #000; font-weight: 600;
  cursor: pointer; border: none; font-size: 0.88rem;
}

.chat-main-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: #555; font-size: 0.92rem;
}


/* ================================================================
   管理员后台 (admin.html)
   ================================================================ */
.admin-container {
  max-width: 1200px; margin: 0 auto; padding: 30px 16px 60px;
}
.admin-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0;
}
.admin-tab {
  padding: 10px 18px; border-radius: 8px 8px 0 0;
  font-size: 0.84rem; font-weight: 500;
  color: #888; background: none;
  border: none; cursor: pointer; transition: all 0.2s;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tab:hover { color: #bbb; }
.admin-tab.active { color: #c9a96e; border-bottom-color: #c9a96e; background: rgba(201,169,110,0.05); }

/* 面板切换：用 display 控制显隐（WebView 最兼容，不产生横向偏移） */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-section {
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.admin-section h2 { font-size: 1.1rem; color: #f5f5f5; margin-bottom: 16px; }
.admin-section h3 { font-size: 0.95rem; color: #c9a96e; margin: 0 0 12px; }

.user-search-box {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.user-search-box input {
  flex: 1; padding: 10px 16px; border-radius: 8px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5; font-size: 0.9rem; outline: none; font-family: inherit;
}
.user-search-box input:focus { border-color: #c9a96e; }

/* 用户管理表格 */
.user-table {
  width: 100%; border-collapse: collapse; font-size: 0.86rem;
}
.user-table thead th {
  padding: 12px 14px; text-align: left;
  font-weight: 600; font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #707090;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.user-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
  color: #ddd;
}
.user-table tr:hover td { background: rgba(255,255,255,0.02); }
.user-table img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* ===== 管理后台 - 弹窗 Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active,
.modal-overlay[style*="display: block"],
.modal-overlay[style*="display:flex"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-box {
  background: #161616;
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(201,169,110,0.08);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-box,
.modal-overlay[style*="display"] .modal-box {
  transform: scale(1) translateY(0) !important;
}

.modal-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* modal 内的 form-group 需要更紧凑 */
.modal-box .form-group { margin-bottom: 14px; }
.modal-box label {
  display: block;
  font-size: 0.85rem;
  color: #bbb;
  margin-bottom: 6px;
  font-weight: 500;
}
.modal-box input,
.modal-box textarea,
.modal-box select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}
.modal-box input:focus,
.modal-box textarea:focus,
.modal-box select:focus { border-color: #c9a96e; }
.modal-box textarea { min-height: 80px; resize: vertical; }

/* modal 按钮 */
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}


/* ================================================================
   个人中心 (profile.html)
   ================================================================ */
.profile-header {
  display: flex; align-items: flex-start; gap: 28px;
  padding: 30px;
}
@media(max-width: 640px) {
  .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  object-fit: cover; border: 3px solid #c9a96e;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 700; color: #c9a96e;
  overflow: hidden; background: #1a1a1a;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* ====== 头像框核心样式（全站通用）====== */
/* 设计原理：外框用金色渐变background + 细padding = 金环效果 */
/* 关键：内层选择器必须排除 ::before/::after，否则破坏浮动图标定位 */

.profile-avatar-frame,
.member-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  /* 金色渐变外框 */
  background: linear-gradient(135deg, #c9a96e, #a67c3e, #c9a96e, #dfbd7a);
  padding: 3px;
  box-shadow:
    0 0 12px rgba(201,169,110,.25),
    0 0 24px rgba(201,169,110,.1);
  /* 关键：不能用 overflow:hidden，否则裁掉外框 */
  overflow: visible !important;
}

/* profile 页面头像框尺寸 - !important 覆盖所有其他CSS */
.profile-avatar-frame {
  width: 116px !important;
  height: 116px !important;
}

/* member 页面头像框尺寸 */
.member-avatar-frame {
  width: 84px !important;
  height: 84px !important;
  margin: 0 auto 14px;
}

/* 内层头像 - 深色底 + 无边框 + 居中 */
/* 用 :not(:before):not(:after) 排除伪元素！ */
.profile-avatar-frame > .profile-avatar,
.profile-avatar-frame > *:not(:before):not(:after),
.member-avatar-frame > .member-avatar,
.member-avatar-frame > *:not(:before):not(:after) {
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #161616 !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* profile 内层尺寸 */
.profile-avatar-frame > .profile-avatar,
.profile-avatar-frame > *:not(:before):not(:after):not(.profile-avatar-edit) {
  width: 110px !important;
  height: 110px !important;
}

/* member 内层尺寸 */
.member-avatar-frame > .member-avatar,
.member-avatar-frame > *:not(:before):not(:after) {
  width: 78px !important;
  height: 78px !important;
  font-size: 1.8rem !important;
}

/* 消息页头像框样式 */
.chat-avatar-frame {
  width: 44px !important;
  height: 44px !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a96e, #a67c3e, #c9a96e, #dfbd7a) !important;
  padding: 2px !important;
  box-shadow: 0 0 8px rgba(201,169,110,.2) !important;
  overflow: visible !important;
}
.chat-avatar-frame > .chat-conv-avatar,
.chat-avatar-frame > .chat-header-avatar,
.chat-avatar-frame > *:not(:before):not(:after) {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #161616 !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.chat-avatar-frame > .chat-conv-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* 商城头像框预览 */
.shop-card-frame-preview {
  width: 72px !important;
  height: 72px !important;
  margin: 14px auto 10px;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2rem !important;
  position: relative !important;
}
/* 商城预览内层 - 只匹配真实子元素，排除 ::before/::after */
.shop-card-frame-preview > *:not(:before):not(:after) {
  width: calc(100% - 6px) !important;
  height: calc(100% - 6px) !important;
  border-radius: 50% !important;
  background: #1a1a1a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ====== 激活头像框的动态效果（覆盖全站所有页面）====== */
.profile-avatar-frame.golden_crown,
.member-avatar-frame.golden_crown,
.chat-avatar-frame.golden_crown,
.shop-card-frame-preview.golden_crown {
  background: radial-gradient(circle, rgba(240,192,96,.25) 0%, rgba(240,192,96,.05) 60%, transparent 70%) !important;
  box-shadow: 0 0 0 2px rgba(240,192,96,.5), 0 0 10px rgba(240,192,96,.5) !important;
  border: 1px solid rgba(240,192,96,.8) !important;
  animation: sri-goldenGlow 3s ease-in-out infinite;
}
.profile-avatar-frame.golden_crown::before,
.member-avatar-frame.golden_crown::before,
.chat-avatar-frame.golden_crown::before,
.shop-card-frame-preview.golden_crown::before {
  content: '👑';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) scale(.75);
  font-size: 11px;
  filter: drop-shadow(0 0 3px rgba(240,192,96,.9));
  z-index: 3;
  animation: sri-crownFloat 2s ease-in-out infinite;
  pointer-events: none;
}

.profile-avatar-frame.shadow_wings,
.member-avatar-frame.shadow_wings,
.chat-avatar-frame.shadow_wings,
.shop-card-frame-preview.shadow_wings {
  background: radial-gradient(circle, rgba(123,104,238,.25) 0%, rgba(123,104,238,.05) 60%, transparent 70%) !important;
  box-shadow: 0 0 0 2px rgba(123,104,238,.5), 0 0 10px rgba(123,104,238,.5) !important;
  border: 1px solid rgba(123,104,238,.8) !important;
  animation: sri-purplePulse 3s ease-in-out infinite;
}
.profile-avatar-frame.shadow_wings::before,
.member-avatar-frame.shadow_wings::before,
.chat-avatar-frame.shadow_wings::before,
.shop-card-frame-preview.shadow_wings::before {
  content: '🦇';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) scale(.7);
  font-size: 11px;
  filter: drop-shadow(0 0 3px rgba(123,104,238,.9));
  z-index: 3;
  animation: sri-crownFloat 2s ease-in-out infinite;
  pointer-events: none;
}

.profile-avatar-frame.star_ring,
.member-avatar-frame.star_ring,
.chat-avatar-frame.star_ring,
.shop-card-frame-preview.star_ring {
  background: radial-gradient(circle, rgba(80,200,255,.25) 0%, rgba(80,200,255,.05) 60%, transparent 70%) !important;
  box-shadow: 0 0 0 2px rgba(80,200,255,.5), 0 0 10px rgba(80,200,255,.5) !important;
  border: 1px solid rgba(80,200,255,.8) !important;
  animation: sri-cyanPulse 3s ease-in-out infinite;
}
.profile-avatar-frame.star_ring::before,
.member-avatar-frame.star_ring::before,
.chat-avatar-frame.star_ring::before,
.shop-card-frame-preview.star_ring::before {
  content: '⭐';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) scale(.75);
  font-size: 10px;
  filter: drop-shadow(0 0 3px rgba(80,200,255,.9));
  z-index: 3;
  animation: sri-starTwinkle 1.5s ease-in-out infinite;
  pointer-events: none;
}

.profile-avatar-frame.phoenix_flame,
.member-avatar-frame.phoenix_flame,
.chat-avatar-frame.phoenix_flame,
.shop-card-frame-preview.phoenix_flame {
  background: radial-gradient(circle, rgba(255,107,74,.25) 0%, rgba(255,107,74,.05) 60%, transparent 70%) !important;
  box-shadow: 0 0 0 2px rgba(255,107,74,.5), 0 0 10px rgba(255,107,74,.5) !important;
  border: 1px solid rgba(255,107,74,.8) !important;
  animation: sri-flamePulse 1.5s ease-in-out infinite;
}
.profile-avatar-frame.phoenix_flame::before,
.member-avatar-frame.phoenix_flame::before,
.chat-avatar-frame.phoenix_flame::before,
.shop-card-frame-preview.phoenix_flame::before {
  content: '🔥';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) scale(.75);
  font-size: 10px;
  filter: drop-shadow(0 0 3px rgba(255,107,74,.9));
  z-index: 3;
  animation: sri-flameFlicker 1s ease-in-out infinite;
  pointer-events: none;
}

/* ====== 动画定义 ====== */
@keyframes sri-goldenGlow { 0%,100% { box-shadow: 0 0 0 2px rgba(240,192,96,.5), 0 0 10px rgba(240,192,96,.4); } 50% { box-shadow: 0 0 0 2px rgba(240,192,96,.7), 0 0 14px rgba(240,192,96,.6); } }
@keyframes sri-crownFloat { 0%,100% { transform: translateX(-50%) translateY(0) scale(.75); } 50% { transform: translateX(-50%) translateY(-2px) scale(.75); } }
@keyframes sri-purplePulse { 0%,100% { box-shadow: 0 0 0 2px rgba(123,104,238,.5), 0 0 10px rgba(123,104,238,.4); } 50% { box-shadow: 0 0 0 2px rgba(123,104,238,.7), 0 0 14px rgba(123,104,238,.6); } }
@keyframes sri-cyanPulse { 0%,100% { box-shadow: 0 0 0 2px rgba(80,200,255,.5), 0 0 10px rgba(80,200,255,.4); } 50% { box-shadow: 0 0 0 2px rgba(80,200,255,.7), 0 0 14px rgba(80,200,255,.6); } }
@keyframes sri-starTwinkle { 0%,100% { opacity: 1; transform: translateX(-50%) scale(.75); } 50% { opacity: .35; transform: translateX(-50%) scale(.75); } }
@keyframes sri-flamePulse { 0%,100% { box-shadow: 0 0 0 2px rgba(255,107,74,.5), 0 0 10px rgba(255,107,74,.4); } 50% { box-shadow: 0 0 0 2px rgba(255,107,74,.7), 0 0 14px rgba(255,107,74,.6); } }
@keyframes sri-flameFlicker { 0%,100% { transform: translateX(-50%) translateY(0) scale(.75); opacity: .8; } 50% { transform: translateX(-50%) translateY(-2px) scale(.75); opacity: 1; } }

/* ====== 原始定义（保留作为后备）====== */
.profile-avatar-edit {
  position: absolute; bottom: 2px; right: 2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #c9a96e; color: #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.85rem;
  border: 2px solid #161616;
}
.profile-info { flex: 1; min-width: 0; }
.profile-nickname { font-size: 1.4rem; font-weight: 700; color: #f5f5f5; margin-bottom: 4px; }
.profile-username { font-size: 0.88rem; color: #888; margin-bottom: 8px; }
.profile-member-code { font-size: 0.82rem; color: #c9a96e; font-family: monospace; }
.profile-labels { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.profile-label {
  display: inline-block; padding: 3px 12px; border-radius: 14px;
  font-size: 0.76rem; background: rgba(201,169,110,0.1); color: #c9a96e;
}
.member-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.member-role-badge {
  font-size: 0.74rem; padding: 2px 8px; border-radius: 4px;
  background: rgba(100,149,237,0.15); color: #6495ED;
}

/* 统计数据 */
.profile-stats { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.profile-stat { text-align: center; min-width: 56px; }
.profile-stat .val { font-size: 1.15rem; font-weight: 700; color: #f5f5f5; display: block; }
.profile-stat .lbl { font-size: 0.74rem; color: #707070; margin-top: 2px; display: block; }

/* 在线状态 */
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CAF50; display: inline-block; }
.online-dot-lg { width: 11px; height: 11px; }
.offline-dot { background: #666; }

/* 表单元素 */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-label { display: block; font-size: 0.85rem; color: #bbb; margin-bottom: 6px; font-weight: 500; }
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5; font-size: 0.9rem; outline: none;
  font-family: inherit; transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: #c9a96e; }
textarea { min-height: 100px; resize: vertical; }
.form-input { /* alias for input */ }
.form-textarea { min-height: 120px; }
.form-hint { font-size: 0.78rem; color: #707070; margin-top: 4px; }
.privacy-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.privacy-toggle { display: inline-flex; align-items: center; cursor: pointer; }
.privacy-slider {
  width: 48px; height: 26px; border-radius: 13px;
  position: relative; cursor: pointer; background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}
.privacy-slider::after {
  content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: transform 0.3s;
}
.privacy-toggle input:checked + .privacy-slider { background: #c9a96e; }
.privacy-toggle input:checked + .privacy-slider::after { transform: translateX(22px); }

/* 按钮 */
.signin-btn, .follow-btn {
  display: inline-block; padding: 9px 22px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.signin-btn { background: #c9a96e; color: #000; }
.signin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.follow-btn { background: #1e1e1e; color: #bbb; border: 1px solid rgba(255,255,255,0.1); }
.follow-btn:hover { border-color: #c9a96e; color: #c9a96e; }

.admin-btn-sm {
  padding: 5px 14px; border-radius: 6px; font-size: 0.78rem;
  cursor: pointer; transition: all 0.2s; border: none; font-weight: 500;
}
.admin-btn-sm.primary { background: #c9a96e; color: #000; }
.admin-btn-sm.danger { background: rgba(255,80,80,0.15); color: #FF5050; }

/* 邀请链接 */
.invite-link-box {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
}
.invite-link-box code { color: #c9a96e; font-size: 0.8rem; }

/* 好友列表 */
.friend-chip-wrapper {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 4px 10px 4px 4px; margin: 3px;
}
.friend-chip { display: flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.friend-chip-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  background: #222; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #c9a96e; overflow: hidden;
}
.friend-chip-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.friend-chip-name { font-size: 0.83rem; color: #ddd; }
.friend-delete-btn {
  font-size: 0.62rem; padding: 1px 6px;
  background: rgba(232,93,61,0.15); color: #e85d3d;
  border: 1px solid rgba(232,93,61,0.3); border-radius: 4px;
  cursor: pointer;
}

/* 用户标签 */
.user-tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 0.78rem; }

/* Steam 卡片 */
.steam-user { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.steam-avatar { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.steam-user-info { flex: 1; }
.steam-nickname { font-weight: 600; color: #f5f5f5; font-size: 1rem; }
.steam-id { font-size: 0.8rem; color: #66b1ff; text-decoration: none; }
.steam-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.steam-stat { text-align: center; padding: 14px 8px; background: #1a1a1a; border-radius: 8px; }
.steam-stat-value { font-size: 1.05rem; font-weight: 700; color: #c9a96e; }
.steam-stat-label { font-size: 0.74rem; color: #707070; margin-top: 2px; }
.steam-input-wrap { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.steam-input { flex: 1; padding: 10px 14px; border-radius: 8px; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1); color: #f5f5f5; font-size: 0.88rem; outline: none; font-family: inherit; }
.steam-input:focus { border-color: #c9a96e; }

/* 帖子卡片（点赞列表用） */
.post-card { background: #161616; border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 14px 18px; }
.post-title { font-size: 0.9rem; color: #ddd; }
.post-title a { text-decoration: none; color: inherit; }
.post-title a:hover { color: #c9a96e; }


/* ================================================================
   成员页面 (members.html)
   ================================================================ */
.member-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px;
}
@media(min-width: 420px) { .member-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 768px) { .member-grid { grid-template-columns: repeat(3, 1fr); } }
@media(min-width: 1100px) { .member-grid { grid-template-columns: repeat(4, 1fr); } }

.member-card {
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 24px 16px; text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}
.member-card:hover { transform: translateY(-4px); border-color: rgba(201,169,110,0.2); }
.member-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; border: 2px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; color: #c9a96e;
  background: #1a1a1a; overflow: hidden;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 已在上面统一定义，此处保留兼容 */
.member-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a96e, #a67c3e, #c9a96e);
  padding: 3px;
  box-shadow: 0 0 12px rgba(201,169,110,.25), 0 0 24px rgba(201,169,110,.1);
  overflow: visible !important;
  margin: 0 auto 14px;
}
.member-code { font-size: 0.76rem; color: #c9a96e; font-family: monospace; margin-bottom: 2px; }
.member-nickname { font-size: 1rem; font-weight: 600; color: #f5f5f5; margin-bottom: 4px; }
.member-bio { font-size: 0.82rem; color: #707070; line-height: 1.5; margin-bottom: 12px; }
.member-labels { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.member-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.72rem; background: rgba(201,169,110,0.1); color: #c9a96e; }
.online-count-bar { font-size: 0.8rem; color: #707070; margin-bottom: 16px; }
.member-follow-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.04); justify-content: center; }
.follow-btn-sm {
  padding: 4px 12px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 500; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #bbb;
  transition: all 0.2s;
}
.follow-btn-sm:hover { border-color: #c9a96e; color: #c9a96e; }

/* 危险按钮 */
.btn-danger {
  background: rgba(232,93,61,0.15) !important;
  color: #e85d3d !important;
  border: 1px solid rgba(232,93,61,0.3) !important;
}
.btn-danger:hover { background: rgba(232,93,61,0.25) !important; }


/* ================================================================
   论坛页面 (forum.html)
   ================================================================ */
.forum-list { margin-top: 24px; }
.forum-post {
  background: #161616; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 22px 26px; margin-bottom: 14px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.forum-post:hover { border-color: rgba(201,169,110,0.15); transform: translateX(4px); }
.forum-post-title { font-size: 1.08rem; font-weight: 600; color: #f5f5f5; margin-bottom: 8px; line-height: 1.5; }
.forum-post-title a { color: inherit; text-decoration: none; }
.forum-post-title a:hover { color: #c9a96e; }
.forum-post-meta { display: flex; align-items: center; gap: 16px; font-size: 0.82rem; color: #707070; flex-wrap: wrap; }
.forum-post-author { display: flex; align-items: center; gap: 6px; color: #c9a96e; font-weight: 500; }
.forum-post-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.forum-post-excerpt { font-size: 0.88rem; color: #999; line-height: 1.7; margin-top: 10px; }
.forum-post-actions { display: flex; gap: 16px; margin-top: 14px; }
.forum-action-btn { font-size: 0.82rem; color: #707070; cursor: pointer; transition: color 0.2s; background: none; border: none; padding: 0; }
.forum-action-btn:hover { color: #c9a96e; }


/* ================================================================
   心愿单 (wishlist.html)
   ================================================================ */
.wishlist-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
@media(min-width: 480px) { .wishlist-grid { grid-template-columns: repeat(2, 1fr); } }
.wishlist-empty { text-align: center; padding: 60px 20px; color: #707070; }


/* ================================================================
   Toast 提示
   ================================================================ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 10px; font-size: 0.88rem; color: #fff; animation: slideInRight 0.3s ease; max-width: 340px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.toast.success { background: linear-gradient(135deg, #2d8a4e, #1e6b38); }
.toast.error { background: linear-gradient(135deg, #d43d3d, #a62b2b); }
.toast.info { background: linear-gradient(135deg, #3d7dd4, #2b5ea6); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }


/* ================================================================
   分页
   ================================================================ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination button, .pagination a {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.86rem; color: #bbb;
  background: #161616; border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; transition: all 0.2s; text-decoration: none; padding: 0 10px;
}
.pagination button:hover, .pagination a:hover, .pagination button.active { background: #c9a96e; color: #000; border-color: #c9a96e; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }


/* Page Hero 子页面顶部 */
.page-hero { padding: 40px 0 30px; text-align: center; background: linear-gradient(180deg, #161616, #0d0d0d); border-bottom: 1px solid rgba(255,255,255,0.03); }
.page-hero h1 { font-size: 1.6rem; font-weight: 700; color: #f5f5f5; margin-bottom: 6px; }
.page-hero p { color: #707070; font-size: 0.9rem; }


/* ================================================================
   管理后台 - 标签样式编辑器 & 其他组件
   ================================================================ */
.tag-style-editor {
  background: #1a1a1a;
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 10px;
  padding: 16px;
}
.tag-preview-inline {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  background: #c9a96e;
  color: #000;
}
.premium-tag { box-shadow: 0 0 8px rgba(201,169,110,0.3); }
.animated-tag {
  animation: shimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

.gradient-direction-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.gradient-direction-btns button {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  background: #222;
  color: #aaa;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s;
}
.gradient-direction-btns button:hover,
.gradient-direction-btns button.active {
  background: rgba(201,169,110,0.15);
  color: #c9a96e;
  border-color: rgba(201,169,110,0.3);
}

.gradient-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.gp-btn {
  width: 100%; aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.gp-btn:hover { transform: scale(1.1); border-color: #c9a96e; }

/* ===== 标签编辑器补充样式 ===== */
.tag-bg-type-btns { display:flex; gap:6px; margin-bottom:12px; }
.tag-bg-type-btns button {
  padding:6px 14px; border-radius:6px; font-size:.82rem; cursor:pointer;
  background:#222; color:#aaa; border:1px solid rgba(255,255,255,0.08); transition:all .2s;
}
.tag-bg-type-btns button.active,
.tag-bg-type-btns button:hover { background:rgba(201,169,110,.15); color:#c9a96e; border-color:rgba(201,169,110,.3); }

.color-input-group { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.color-input-group label { font-size:.78rem; color:#909090; min-width:80px; }
.color-input-group input[type="color"] {
  width:36px; height:30px; border:none; border-radius:6px; cursor:pointer; background:transparent;
  padding:0;
}
.color-input-group input[type="text"] {
  width:90px; padding:5px 8px; border-radius:6px; font-size:.82rem;
  background:#111; border:1px solid rgba(255,255,255,0.1); color:#f5f5f5; outline:none;
}
.color-input-group input[type="text"]:focus { border-color:#c9a96e; }

/* 标签编辑器内部段落 */
.tag-style-editor .editor-row { margin-bottom:14px; }
.tag-style-editor .editor-row label { display:block; font-size:.75rem; color:#909090; margin-bottom:5px; letter-spacing:.5px; }
.tag-style-editor .editor-row input,
.tag-style-editor .editor-row select {
  background:#111; border:1px solid rgba(255,255,255,0.1); color:#f5f5f5;
  padding:6px 10px; border-radius:6px; font-size:.84rem; outline:none; font-family:inherit;
}
.tag-style-editor .editor-row input:focus,
.tag-style-editor .editor-row select:focus { border-color:#c9a96e; }

/* 渐变方向按钮活跃状态 */
.gradient-direction-btns button.active {
  background:rgba(201,169,110,.2)!important; color:#c9a96e!important; border-color:rgba(201,169,110,.4)!important;
}

/* 搜索栏 */
.member-search-bar input {
  padding: 10px 16px; border-radius: 8px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f5; font-size: 0.88rem; outline: none; font-family: inherit;
}
.member-search-bar input:focus { border-color: #c9a96e; }


/* ================================================================
   个人中心页面专用 (profile.html) - 覆盖和补充
   ================================================================ */

/* 个人中心的 page-card 内部布局 */
.page-card:has(.profile-header) {
  padding: 28px 32px;
}

/* 编辑资料区域 - 限制宽度避免散开 */
.page-card:has(.profile-header) > div[style*="margin-top"],
.page-card:has(.profile-header) > .profile-friends-section,
.page-card:has(.profile-header) > .profile-liked-posts-section {
  max-width: 640px;
}

/* 表单输入框宽度约束 */
.page-card:has(.profile-header) input[type="text"],
.page-card:has(.profile-header) textarea {
  max-width: 380px;
}
.page-card:has(.profile-header) input[type="text"].form-input#edit-birthday-v2 {
  max-width: 140px;
}

/* 标题样式 */
.page-card:has(.profile-header) h3 {
  font-size: 1rem;
  color: #c9a96e;
  margin-bottom: 12px;
  font-weight: 600;
}

/* 隐私行 */
.page-card:has(.profile-header) .privacy-row {
  max-width: 480px;
}

/* 确保用户背景不会覆盖内容 */
#user-profile-background {
  z-index: -1 !important;
}

/* 好友/点赞区域 */
.profile-friends-section h3,
.profile-liked-posts-section h3 {
  font-size: 1rem;
  color: #c9a96e;
  margin-bottom: 12px;
}
