:root {
  --primary: #ff5c8a;
  --secondary: #a55eea;
  --grad: linear-gradient(90deg, #ff5c8a, #a55eea);
}

body {
  background: linear-gradient(135deg, #0f1023, #1b1440 50%, #2d1b4e);
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding-top: 70px;
}

/* ===== 全站公告横幅（前台所有页面顶部） ===== */
.site-notice {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  background: linear-gradient(90deg, rgba(255, 92, 138, 0.18), rgba(165, 94, 234, 0.18));
  color: #ffe3ec; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px; font-size: 13px; line-height: 1.5; text-align: center;
}
.site-notice i { color: #ff5c8a; flex-shrink: 0; }
.site-notice span { overflow-wrap: anywhere; }

/* ===== 导航 ===== */
.navbar {
  background: rgba(15, 16, 35, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.35rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.navbar .nav-link { color: #c9c9e4; }
.navbar .nav-link:hover { color: #fff; }
.navbar-toggler { border-color: rgba(255,255,255,.2); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-user { color: #fff; font-weight: 600; }
.sign-badge {
  background: rgba(165, 94, 234, 0.25);
  color: #e6c8ff;
  border: 1px solid rgba(165, 94, 234, 0.5);
  font-size: 13px;
  padding: 7px 12px;
}

.btn-sign {
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  border: 0;
  border-radius: 20px;
  padding: 7px 18px;
}
.btn-sign:hover { color: #fff; opacity: .9; }
.btn-sign:disabled { opacity: .5; }

/* ===== 卡片 ===== */
.card-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

/* ===== 首页 Hero ===== */
.hero {
  text-align: center;
  padding: 46px 0 30px;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: #a9a9c4; font-size: 15px; }

/* ===== 盲盒卡片 ===== */
.box-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}
.box-card:hover { transform: translateY(-8px); }
.box-card.male:hover { box-shadow: 0 16px 40px rgba(72, 149, 239, .35); }
.box-card.female:hover { box-shadow: 0 16px 40px rgba(255, 92, 138, .35); }
.box-card img { width: 100%; height: 230px; object-fit: cover; display: block; }
.box-card .box-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 25, 0.9));
}
.box-card .box-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 20px;
}
.box-card .box-body .t { font-size: 22px; font-weight: 800; }
.box-card .box-body .d { color: #b9b9d6; font-size: 13px; margin-top: 4px; }
.box-card .box-price {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
}
.box-card.male .box-price { background: rgba(72, 149, 239, .85); color: #fff; }
.box-card.female .box-price { background: var(--grad); color: #fff; }

/* ===== 电脑版布局：首页盲盒卡片更紧凑、图片不过大 ===== */
@media (min-width: 992px) {
  .box-card { max-width: 460px; margin: 0 auto; }
  .box-card img { height: 200px; }
  .box-card .box-body { padding: 12px 18px; }
  .box-card .box-body .t { font-size: 20px; }
  .box-card .box-body .d { font-size: 12px; }
}

/* ===== 用户卡片 ===== */
.me-card { padding: 22px; }
.avatar-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: var(--grad);
}
.info-line { color: #c9c9e4; font-size: 14px; margin-top: 6px; }
.info-line b { color: #fff; }
.info-line i { color: #ff5c8a; margin-right: 6px; }

/* ===== 表单页 ===== */
.auth-card {
  max-width: 460px;
  margin: 40px auto;
  padding: 34px;
}
.auth-card h2 { font-weight: 800; margin-bottom: 4px; }
.auth-card .sub { color: #a9a9c4; font-size: 13px; margin-bottom: 22px; }
.form-control, .form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
}
.form-control:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #ff5c8a;
  box-shadow: 0 0 0 .2rem rgba(255, 92, 138, .15);
}
.form-control::placeholder { color: #6f6f92; }
.form-select option { background: #1b1440; color: #fff; }
.form-label { color: #c9c9e4; font-size: 13px; }
.btn-main {
  background: var(--grad);
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  color: #fff;
  width: 100%;
}
.btn-main:hover { color: #fff; opacity: .9; }
.gender-radio { display: none; }
.gender-box {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: .2s;
}
.gender-radio:checked + .gender-box { border-color: #ff5c8a; background: rgba(255, 92, 138, 0.18); }
.gender-box .g-icon { font-size: 26px; display: block; }

/* ===== 支付弹窗 ===== */
.pay-modal { background: #191a35; color: #fff; border-radius: 18px; border: 1px solid rgba(255,255,255,.12); }
.pay-gender { font-size: 18px; font-weight: 700; color: #ffd166; }
.pay-price { font-size: 40px; font-weight: 800; margin: 8px 0; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.pay-tip { color: #9a9ab8; font-size: 13px; }
.pay-type input { display: none; }
.pay-type-box {
  display: block;
  padding: 9px 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 14px;
}
.pay-alipay { color: #4facfe; }
.pay-wxpay { color: #2ecc71; }
.pay-type input:checked + .pay-type-box { border-color: #ff5c8a; background: rgba(255, 92, 138, 0.2); }
.btn-pay { background: var(--grad); color: #fff; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; }
.btn-pay:hover { color: #fff; opacity: .9; }

/* ===== 积分支付 ===== */
.pay-points { color: #ffd166; }
.pay-type input:checked + .pay-points { border-color: #ffd166; background: rgba(255, 209, 102, 0.18); }
.pay-type input:disabled + .pay-points { opacity: .4; cursor: not-allowed; }
.pay-points-tip { margin-top: 12px; font-size: 13px; color: #ffd166; }
.box-price-points {
  font-size: 12px; font-weight: 600; color: #ffd166;
  background: rgba(255, 209, 102, .15);
  border: 1px solid rgba(255, 209, 102, .4);
  padding: 3px 10px; border-radius: 14px;
}

/* ===== 开箱动画 ===== */
.open-wrap { text-align: center; padding: 60px 0 30px; }
.count-ring {
  width: 150px; height: 150px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#ff5c8a, #a55eea, #ff5c8a);
  animation: spin 1.2s linear infinite;
  position: relative;
}
.count-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #1b1440;
}
.count-num {
  position: relative;
  font-size: 56px;
  font-weight: 800;
  color: #ffd166;
}
@keyframes spin { to { transform: rotate(360deg); } }
.box-emoji {
  font-size: 90px;
  display: inline-block;
  animation: shake .6s ease-in-out infinite;
}
@keyframes shake {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.open-title { font-size: 20px; font-weight: 700; }
.open-sub { color: #a9a9c4; font-size: 14px; margin-top: 6px; }

/* ===== 开奖结果 ===== */
.result-card {
  padding: 34px 24px;
  text-align: center;
  animation: pop .5s ease;
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.result-prize {
  display: inline-block;
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 209, 102, 0.18);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
}
.result-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  margin: 16px auto;
  font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad);
  overflow: hidden;
}
.result-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.result-name { font-size: 24px; font-weight: 800; }
.result-item {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-item i { color: #ff5c8a; font-size: 18px; }
.result-item .k { color: #9a9ab8; font-size: 13px; width: 48px; }
.result-item .v { color: #fff; font-weight: 600; word-break: break-all; }

/* ===== 表格页 ===== */
.table-dark-table { color: #e4e4f5; }
.table-dark-table thead th {
  background: rgba(255, 255, 255, 0.07);
  color: #b9b9d6;
  font-size: 13px;
  border-color: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.table-dark-table tbody td { border-color: rgba(255, 255, 255, 0.08); vertical-align: middle; }
.table-dark-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
.page-title { font-size: 22px; font-weight: 800; margin: 26px 0 18px; }

/* ===== Toast ===== */
#toastWrap { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 2000; }
.toast-msg {
  background: rgba(15, 16, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 10px 24px;
  border-radius: 20px;
  margin-top: 8px;
  font-size: 14px;
  animation: slideDown .3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast-msg.ok { border-color: rgba(46, 213, 115, .6); }
.toast-msg.err { border-color: rgba(255, 82, 82, .6); }
@keyframes slideDown { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 60px;
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6c6c8a;
  font-size: 13px;
}

/* ===== 后台 ===== */
.admin-body { padding-top: 0; background: #f0f1f7; color: #333; }
.admin-body .form-label, .admin-body .form-select, .admin-body .form-control { color: #333; }
.admin-side {
  width: 230px;
  background: linear-gradient(180deg, #15162e, #241a45);
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
}
.admin-side .brand {
  padding: 22px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-side .brand i { color: #ff5c8a; margin-right: 6px; }
.admin-side .menu a {
  display: block;
  color: #b9b9d6;
  padding: 12px 22px;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.admin-side .menu a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.admin-side .menu a.active {
  background: rgba(255, 92, 138, 0.15);
  color: #ff8fb0;
  border-left-color: #ff5c8a;
}
.admin-side .menu a i { margin-right: 8px; }
.admin-main { margin-left: 230px; padding: 24px; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.admin-top h4 { font-weight: 800; margin: 0; }
.admin-card {
  background: #fff;
  border-radius: 14px;
  border: 0;
  box-shadow: 0 2px 12px rgba(20, 20, 40, 0.06);
}
.stat-card { padding: 20px; }
.stat-card .st-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-card .st-num { font-size: 26px; font-weight: 800; margin-top: 10px; }
.stat-card .st-label { color: #888; font-size: 13px; }
.btn-ms { border-radius: 8px; font-size: 13px; }

/* ===== 聊天面板 ===== */
.chat-card { padding: 16px 18px; }
.chat-card-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.chat-card-title { font-size: 17px; font-weight: 800; }
.chat-card-title i { color: #ff5c8a; margin-right: 6px; }
.chat-tabs { display: flex; gap: 8px; }
.chat-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c9c9e4; border-radius: 20px; padding: 6px 16px;
  font-size: 14px; cursor: pointer;
}
.chat-tab.active {
  background: var(--grad); color: #fff; border-color: transparent; font-weight: 700;
}
.chat-badge {
  display: none; background: #ff4757; color: #fff; font-size: 11px;
  border-radius: 10px; padding: 1px 6px; margin-left: 4px;
}
.chat-search { display: flex; gap: 8px; margin-bottom: 12px; }
.chat-list-title { color: #9a9ab8; font-size: 13px; margin: 8px 0; }
.chat-empty { color: #9a9ab8; font-size: 13px; text-align: center; padding: 18px 0; }
.chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px; cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-item:hover { background: rgba(255, 255, 255, 0.06); }
.chat-item-unread { background: rgba(255, 92, 138, 0.08); }
.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; align-items: center; }
.chat-item-msg {
  color: #8f8fb0; font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.chat-dot {
  background: #ff4757; color: #fff; border-radius: 10px;
  font-size: 11px; padding: 1px 6px; margin-left: 6px;
}
.chat-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.chat-avatar img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.2);
}
.chat-avatar-e {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--grad); flex-shrink: 0;
}

/* ===== 聊天窗口 ===== */
.chat-win { background: #191a35; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; height: 520px; }
.chat-win-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 800;
}
.chat-win-body {
  height: 380px; overflow-y: auto; padding: 14px 16px;
}
.chat-win-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.chat-win-foot input { flex: 1; }
.chat-loading { text-align: center; color: #9a9ab8; font-size: 13px; padding: 30px 0; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg .chat-avatar { width: 34px; height: 34px; }
.chat-msg .chat-avatar img { width: 34px; height: 34px; }
.chat-msg .chat-avatar-e { width: 34px; height: 34px; font-size: 17px; }
.chat-msg-main { max-width: 72%; min-width: 0; }
.chat-msg-name { font-size: 12px; color: #9a9ab8; margin-bottom: 3px; }
.chat-msg-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  word-break: break-word; background: rgba(255, 255, 255, 0.1);
  border-top-left-radius: 4px;
}
.chat-msg.mine .chat-msg-bubble {
  background: var(--grad); border-radius: 14px; border-top-right-radius: 4px;
}
.chat-msg-time { font-size: 11px; color: #6c6c8a; margin-top: 3px; }
.chat-msg.mine .chat-msg-time { text-align: right; }
.btn-chat {
  display: inline-block; text-align: center; padding: 10px 14px;
  border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px;
  background: rgba(72, 149, 239, 0.2); color: #8ec5ff;
  border: 1px solid rgba(72, 149, 239, 0.5);
}
.btn-chat:hover { color: #fff; background: rgba(72, 149, 239, 0.35); }

/* ===== 头像 ===== */
.avatar-img-sm {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.2);
}
.avatar-img-lg {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255, 255, 255, 0.25);
}
.nav-user-avatar { display: inline-flex; align-items: center; gap: 6px; }
.nav-user-avatar img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* ===== 独立聊天页（微信风格双栏） ===== */
.chat-page { padding-top: 10px; }
.chat-app {
  display: flex; height: calc(100vh - 130px); min-height: 520px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px; overflow: hidden;
}
.chat-side { width: 300px; flex-shrink: 0; border-right: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; }
.chat-side-tabs { display: flex; padding: 10px 12px 0; gap: 6px; }
.chat-side-tab {
  flex: 1; background: none; border: 0; color: #9a9ab8; padding: 10px 0 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; position: relative;
  border-bottom: 2px solid transparent;
}
.chat-side-tab.active { color: #ff5c8a; border-bottom-color: #ff5c8a; }
.chat-side-search { display: flex; gap: 6px; padding: 10px 12px; }
.chat-side-search input { flex: 1; }
.chat-side-search button { border: 0; background: var(--grad); color: #fff; border-radius: 10px; padding: 0 14px; }
.chat-side-body { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-tab-panel { display: none; }
.chat-tab-panel.active { display: block; }
.chat-list-head { color: #7c7c9e; font-size: 12px; padding: 10px 8px 6px; }
#searchResult { flex-shrink: 0; max-height: 200px; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.08); }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-main-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #7c7c9e; font-size: 15px;
}
.chat-main-empty i { font-size: 54px; margin-bottom: 10px; opacity: .5; }
.chat-main-head {
  padding: 12px 18px; font-weight: 800; font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-main-body { flex: 1; overflow-y: auto; padding: 16px; }
.chat-main-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.chat-main-foot input { flex: 1; }
.peer-prompt { text-align: center; padding-top: 40px; }
.peer-prompt .chat-avatar { width: 76px; height: 76px; }
.peer-prompt .chat-avatar img { width: 76px; height: 76px; }
.peer-prompt .chat-avatar-e { width: 76px; height: 76px; font-size: 38px; }

@media (max-width: 768px) {
  .chat-side { width: 100%; }
  .chat-main { display: none; }
}

/* ===== 聊天页美化：头像框 + 名称形式 ===== */
.chat-app {
  background: linear-gradient(160deg, rgba(255, 92, 138, 0.06), rgba(165, 94, 234, 0.08) 40%, rgba(20, 22, 43, 0.5));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* 头像框：渐变描边圆框 */
.chat-avatar {
  position: relative;
  width: 44px; height: 44px;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, #ff5c8a, #a55eea, #4facfe, #ff5c8a);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 4px 12px rgba(255, 92, 138, 0.25);
  flex-shrink: 0;
}
.chat-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #151731;
}
.chat-avatar-e {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: conic-gradient(from 120deg, #ff5c8a, #a55eea, #4facfe, #ff5c8a);
  border: 2px solid #151731;
  box-shadow: 0 4px 12px rgba(255, 92, 138, 0.25);
  flex-shrink: 0;
}
.chat-avatar-sm { width: 34px; height: 34px; padding: 1px; box-shadow: none; }
.chat-avatar-sm img { border-width: 1px; }
.chat-avatar-sm.chat-avatar-e { width: 34px; height: 34px; font-size: 17px; }
.chat-avatar-lg { width: 84px; height: 84px; padding: 3px; }
.chat-avatar-lg img { border-width: 3px; }
.chat-avatar-lg.chat-avatar-e { width: 84px; height: 84px; font-size: 42px; }

/* 侧边栏 */
.chat-side { background: rgba(13, 14, 30, 0.7); backdrop-filter: blur(6px); }
.chat-side-tab { color: #8f8fb0; transition: color .2s; }
.chat-side-tab:hover { color: #fff; }
.chat-side-tab.active { color: #ff8fb0; font-weight: 800; }
.chat-side-search input { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.chat-side-search input:focus { border-color: #ff5c8a; }

/* 会话列表项 */
.chat-item {
  border-radius: 12px; margin: 2px 0;
  transition: background .15s, transform .1s;
}
.chat-item:hover { background: rgba(255, 255, 255, 0.08); }
.chat-item-unread { background: rgba(255, 92, 138, 0.1); }
.chat-item-top { display: flex; align-items: center; gap: 6px; }
.chat-item-top b { font-size: 15px; color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 11px; color: #6c6c8a; flex-shrink: 0; }
.chat-item-msg { color: #8f8fb0; }
.chat-item-unread .chat-item-msg { color: #ffb3c8; }

/* 主区域 */
.chat-main-head {
  background: rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.chat-main-head .chat-avatar { width: 36px; height: 36px; }
.chat-main-head .chat-avatar img { width: 100%; }
.chat-main-head .chat-avatar-e { width: 36px; height: 36px; font-size: 18px; }
#chatWinTitle { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; }
#chatWinTitle > span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 消息气泡 */
.chat-msg { margin-bottom: 14px; }
.chat-msg .chat-avatar { width: 36px; height: 36px; }
.chat-msg .chat-avatar img { width: 100%; height: 100%; }
.chat-msg .chat-avatar-e { width: 36px; height: 36px; font-size: 18px; }
.chat-msg-name { font-size: 12px; color: #ffb3c8; margin-bottom: 3px; font-weight: 600; }
.chat-msg-bubble {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  padding: 10px 14px;
}
.chat-msg.mine .chat-msg-bubble {
  background: linear-gradient(135deg, #ff5c8a, #a55eea);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 92, 138, 0.3);
}
.chat-msg-time { color: #6c6c8a; }

/* 好友/群列表 */
.peer-prompt { padding-top: 60px; }
.peer-prompt .chat-avatar { width: 84px; height: 84px; }
.peer-prompt .chat-avatar img { width: 100%; height: 100%; }
.peer-prompt .chat-avatar-e { width: 84px; height: 84px; font-size: 42px; }

/* 群头像（emoji 框） */
.chat-item .chat-avatar-e { background: linear-gradient(135deg, #2b2c4d, #3a2b63); border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); }

/* ===== QQ 风格聊天页 ===== */
.qq-chat {
  display: flex; height: calc(100vh - 130px); min-height: 540px;
  border-radius: 14px; overflow: hidden;
  background: #12142b;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.qq-nav {
  width: 62px; flex-shrink: 0;
  background: linear-gradient(180deg, #1a1c3d, #13152e);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0; gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.qq-nav-me {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--grad);
}
.qq-nav-me img { width: 100%; height: 100%; object-fit: cover; }
.qq-nav-icons { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.qq-nav-btn {
  position: relative; width: 46px; height: 46px; border-radius: 12px;
  border: 0; background: transparent; color: #9a9ab8; font-size: 22px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.qq-nav-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.qq-nav-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(255, 92, 138, 0.4); }
.qq-nav-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px;
  background: #ff4757; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 9px; text-align: center; display: none;
}
.qq-nav-foot a { color: #9a9ab8; font-size: 22px; }
.qq-nav-foot a:hover { color: #fff; }

.qq-list { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; background: #171935; border-right: 1px solid rgba(255, 255, 255, 0.06); }
.qq-list-search { display: flex; align-items: center; gap: 6px; padding: 12px 10px; }
.qq-list-search i { color: #7c7c9e; font-size: 14px; margin-left: 10px; position: absolute; }
.qq-list-search input {
  width: 100%; padding: 8px 10px 8px 30px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.06);
  color: #fff; outline: none; font-size: 13px;
}
.qq-list-search input:focus { border-color: #ff5c8a; }
.qq-list-search button {
  border: 0; background: var(--grad); color: #fff; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.qq-list-title { color: #8f8fb0; font-size: 12px; padding: 10px 14px 4px; }
.qq-list-body { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
#qqSearchResult { flex-shrink: 0; max-height: 220px; overflow-y: auto; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }

.qq-conv-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 10px; cursor: pointer;
  margin-bottom: 2px; transition: background .15s;
}
.qq-conv-item:hover { background: rgba(255, 255, 255, 0.07); }
.qq-conv-item.unread { background: rgba(255, 92, 138, 0.1); }
.qq-conv-main { flex: 1; min-width: 0; }
.qq-conv-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.qq-conv-name { font-size: 14px; font-weight: 600; color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qq-conv-time { font-size: 11px; color: #6c6c8a; flex-shrink: 0; }
.qq-conv-msg { font-size: 12px; color: #8f8fb0; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qq-conv-item.unread .qq-conv-msg { color: #ffb3c8; }
.qq-dot {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  background: #ff4757; color: #fff; font-size: 11px; border-radius: 8px;
  text-align: center; margin-left: 6px;
}
.qq-avatar-g {
  background: linear-gradient(135deg, #2b2c4d, #3a2b63);
  border-color: rgba(255, 255, 255, 0.15);
}

.qq-btn {
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06);
  color: #c9c9e4; border-radius: 8px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; white-space: nowrap;
}
.qq-btn:hover { background: rgba(255, 255, 255, 0.12); }
.qq-btn:disabled { opacity: .5; cursor: not-allowed; }
.qq-btn-primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.qq-btn-primary:hover { background: var(--grad); opacity: .9; }

.qq-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #12142b; }
.qq-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #7c7c9e; font-size: 14px; padding: 20px;
}
.qq-empty i { font-size: 56px; opacity: .5; margin-bottom: 12px; }
.qq-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.qq-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.qq-head-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qq-head-text { min-width: 0; }
.qq-head-name { font-weight: 800; font-size: 15px; color: #fff; }
.qq-head-sub { font-size: 11px; color: #7c7c9e; }
.qq-head-actions { display: flex; gap: 4px; }
.qq-head-actions button {
  border: 0; background: rgba(255, 255, 255, 0.06); color: #9a9ab8;
  width: 34px; height: 34px; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.qq-head-actions button:hover { background: rgba(255, 255, 255, 0.14); color: #ff6b93; }

.qq-msgs { flex: 1; overflow-y: auto; padding: 14px 18px; }
.qq-loading { text-align: center; color: #7c7c9e; padding: 40px 0; }
.qq-divider { text-align: center; margin: 14px 0 8px; }
.qq-divider span {
  display: inline-block; background: rgba(255, 255, 255, 0.08);
  color: #9a9ab8; font-size: 12px; padding: 3px 12px; border-radius: 10px;
}
.qq-msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.qq-msg.mine { flex-direction: row-reverse; }
.qq-msg .chat-avatar { width: 40px; height: 40px; }
.qq-msg .chat-avatar img { width: 100%; height: 100%; }
.qq-msg .chat-avatar-e { width: 40px; height: 40px; font-size: 20px; }
.qq-msg-main { max-width: 72%; min-width: 0; display: flex; flex-direction: column; }
.qq-msg.mine .qq-msg-main { align-items: flex-end; }
.qq-msg-name { font-size: 12px; color: #ffb3c8; margin-bottom: 4px; font-weight: 600; }
.qq-bubble {
  position: relative; padding: 9px 14px; margin-bottom: 4px; max-width: 100%;
  background: rgba(255, 255, 255, 0.1); border-radius: 10px;
  border-top-left-radius: 2px;
  font-size: 14px; line-height: 1.55; color: #f2f2f7;
  word-break: break-word; white-space: pre-wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.qq-msg:not(.mine) .qq-bubble::before {
  content: ''; position: absolute; left: -6px; top: 6px;
  border: 6px solid transparent; border-right-color: rgba(255, 255, 255, 0.1);
}
.qq-msg.mine .qq-bubble {
  background: linear-gradient(135deg, #ff5c8a, #a55eea);
  border-radius: 10px; border-top-right-radius: 2px; color: #fff;
}
.qq-msg.mine .qq-bubble::before {
  content: ''; position: absolute; right: -6px; top: 6px;
  border: 6px solid transparent; border-left-color: #b25ecf;
}
.qq-bubble-time { display: block; font-size: 10px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; text-align: right; }

.qq-input { border-top: 1px solid rgba(255, 255, 255, 0.07); background: #161835; }
.qq-input-tools { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
.qq-input-tools button {
  border: 0; background: transparent; color: #9a9ab8; font-size: 20px; cursor: pointer; padding: 2px 4px;
}
.qq-input-tools button:hover { color: #ff5c8a; }
.qq-count { margin-left: auto; font-size: 11px; color: #6c6c8a; }
.qq-emoji-panel {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  padding: 10px 12px; max-height: 150px; overflow-y: auto;
}
.qq-emoji {
  font-size: 22px; text-align: center; padding: 4px; border-radius: 6px; cursor: pointer;
}
.qq-emoji:hover { background: rgba(255, 255, 255, 0.1); }
.qq-input textarea {
  width: calc(100% - 24px); margin: 4px 12px; padding: 10px;
  border: 0; background: transparent; color: #fff; resize: none;
  font-size: 14px; line-height: 1.5; outline: none; font-family: inherit;
}
.qq-input-foot { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.qq-send {
  border: 0; background: var(--grad); color: #fff; font-weight: 700;
  padding: 8px 26px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.qq-send:hover { opacity: .9; }

.peer-prompt .chat-avatar { width: 84px; height: 84px; }
.peer-prompt .chat-avatar img { width: 100%; height: 100%; }
.peer-prompt .chat-avatar-e { width: 84px; height: 84px; font-size: 42px; }

@media (max-width: 768px) {
  .qq-chat { flex-direction: column; }
  .qq-nav { width: 100%; height: 54px; flex-direction: row; padding: 6px 10px; }
  .qq-nav-icons { flex-direction: row; justify-content: center; }
  .qq-nav-me { width: 36px; height: 36px; }
  .qq-list { width: 100%; height: 45%; }
  .qq-main { height: 55%; }
}

/* ===== 简洁聊天室 ===== */
.simple-chat {
  display: flex; height: calc(100vh - 130px); min-height: 520px;
  border-radius: 14px; overflow: hidden;
  background: #131530; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.sc-list {
  width: 280px; flex-shrink: 0; display: flex; flex-direction: column;
  background: #171935; border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sc-tabs { display: flex; padding: 10px 12px 0; gap: 6px; }
.sc-tab {
  flex: 1; background: none; border: 0; color: #9a9ab8; cursor: pointer;
  padding: 9px 0 11px; font-size: 14px; font-weight: 600; position: relative;
  border-bottom: 2px solid transparent;
}
.sc-tab.active { color: #ff8fb0; border-bottom-color: #ff5c8a; }
.sc-badge {
  display: none; position: absolute; top: 0; right: 14px;
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  background: #ff4757; color: #fff; font-size: 11px; border-radius: 8px;
}
.sc-panel { display: none; flex-direction: column; flex: 1; min-height: 0; }
.sc-panel.active { display: flex; }
.sc-search { display: flex; gap: 6px; padding: 12px; }
.sc-search input {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06);
  color: #fff; outline: none; font-size: 13px;
}
.sc-search input:focus { border-color: #ff5c8a; }
.sc-search button {
  border: 0; background: var(--grad); color: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; cursor: pointer;
}
#scSearchResult { flex-shrink: 0; max-height: 210px; overflow-y: auto; padding: 0 8px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sc-title { color: #8f8fb0; font-size: 12px; padding: 10px 14px 4px; }
.sc-list-body, .sc-panel .sc-item { }
.sc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; margin: 1px 0;
}
.sc-item:hover { background: rgba(255, 255, 255, 0.07); }
.sc-item.unread { background: rgba(255, 92, 138, 0.1); }
.sc-item-main { flex: 1; min-width: 0; }
.sc-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sc-item-name { font-size: 14px; font-weight: 600; color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-item-time { font-size: 11px; color: #6c6c8a; flex-shrink: 0; }
.sc-item-msg { font-size: 12px; color: #8f8fb0; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-item.unread .sc-item-msg { color: #ffb3c8; }
.sc-item-btns { display: flex; gap: 6px; }
.sc-dot {
  display: inline-block; min-width: 15px; height: 15px; line-height: 15px; padding: 0 4px;
  background: #ff4757; color: #fff; font-size: 11px; border-radius: 8px; text-align: center; margin-left: 6px;
}
.sc-avatar-g {
  background: linear-gradient(135deg, #2b2c4d, #3a2b63);
  border-color: rgba(255, 255, 255, 0.15);
}
.sc-btn {
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06);
  color: #c9c9e4; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.sc-btn:hover { background: rgba(255, 255, 255, 0.14); }
.sc-btn:disabled { opacity: .5; cursor: not-allowed; }
.sc-btn.ok { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }

.sc-users-body { flex: 1; overflow-y: auto; padding-bottom: 10px; }
.sc-load-more {
  display: block; margin: 10px auto 0; padding: 8px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06);
  color: #c9c9e4; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.sc-load-more:hover { background: rgba(255, 255, 255, 0.14); }

.sc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #131530; }
.sc-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #7c7c9e; font-size: 14px; padding: 20px;
}
.sc-empty i { font-size: 52px; opacity: .5; margin-bottom: 12px; }
.sc-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sc-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 18px; background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
#scHeadName { font-weight: 800; font-size: 15px; color: #fff; }
.sc-head-sub { font-size: 12px; color: #7c7c9e; }
.sc-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; }
.sc-msg { display: flex; gap: 10px; margin-bottom: 14px; align-items: flex-start; }
.sc-msg.mine { flex-direction: row-reverse; }
.sc-msg .chat-avatar { width: 38px; height: 38px; }
.sc-msg .chat-avatar img { width: 100%; height: 100%; }
.sc-msg .chat-avatar-e { width: 38px; height: 38px; font-size: 19px; }
.sc-msg-main { max-width: 72%; min-width: 0; }
.sc-msg-name { font-size: 12px; color: #ffb3c8; margin-bottom: 3px; font-weight: 600; }
.sc-bubble {
  display: inline-block; padding: 9px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.1); color: #f2f2f7;
  font-size: 14px; line-height: 1.55; word-break: break-word; white-space: pre-wrap;
}
.sc-msg.mine .sc-bubble { background: var(--grad); color: #fff; }
.sc-msg-time { font-size: 11px; color: #6c6c8a; margin-top: 3px; }
.sc-msg.mine .sc-msg-time { text-align: right; }
.sc-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.sc-foot input {
  flex: 1; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06);
  color: #fff; outline: none; font-size: 14px;
}
.sc-foot input:focus { border-color: #ff5c8a; }
.sc-foot button {
  border: 0; background: var(--grad); color: #fff; font-weight: 700;
  padding: 10px 22px; border-radius: 10px; cursor: pointer;
}
.sc-peer { text-align: center; padding-top: 50px; }
.sc-peer .chat-avatar { width: 80px; height: 80px; }
.sc-peer .chat-avatar img { width: 100%; height: 100%; }
.sc-peer .chat-avatar-e { width: 80px; height: 80px; font-size: 40px; }

@media (max-width: 768px) {
  .simple-chat { flex-direction: column; }
  .sc-list { width: 100%; height: 45%; }
  .sc-main { height: 55%; }
}

/* 私聊模块样式已迁移至独立文件 assets/css/chat.css */

