﻿/* ============================================================
   统一深色覆盖层 —— 放在最后，优先级最高
   ============================================================ */

/* 基础 */
html, body {
  background: #000 !important;
  color: #fff !important;
}

/* 登录页 */
#view-login {
  background:
    radial-gradient(900px 500px at 50% -8%, rgba(46, 196, 166, .14), transparent 62%),
    #000 !important;
}

.login-card {
  background: #111 !important;
  border: 1px solid #222 !important;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9) !important;
}

.login-brand h1 { color: #fff !important; }
.login-brand .tagline { color: #8a8a8a !important; }
.footnote { color: #4a4a4a !important; }
.field-label { color: #d0d0d0 !important; }

/* 输入框 */
input[type=text],
input[type=number],
input[type=file],
textarea,
select {
  background: #161616 !important;
  border-color: #2a2a2a !important;
  color: #fff !important;
}

input::placeholder,
textarea::placeholder { color: #555 !important; }

input:focus,
textarea:focus,
select:focus {
  border-color: #2ec4a6 !important;
  background: #161616 !important;
}

/* 分段控件 */
.seg {
  background: #161616 !important;
  border-color: #222 !important;
}
.seg button { color: #8a8a8a !important; }
.seg button.on {
  background: #2ec4a6 !important;
  color: #fff !important;
}

/* 卡片 / 列表 */
.list li {
  background: #111 !important;
  border-color: #1f1f1f !important;
}
.list li:hover {
  background: #161616 !important;
  border-color: #2a2a2a !important;
}
.list li .t { color: #fff !important; }
.list li .s { color: #8a8a8a !important; }

.edit-panel {
  background: #111 !important;
  border-color: #222 !important;
}
.edit-row label { color: #d0d0d0 !important; }

/* 顶栏 / 底部 */
.topbar {
  background: #000 !important;
  border-bottom-color: #1f1f1f !important;
}
.topbar #me-name { color: #fff !important; }

.sig-bar {
  background: #0a0a0a !important;
  border-bottom-color: #1a1a1a !important;
  color: #7a7a7a !important;
}

/* 聊天列表 */
.room-item {
  background: transparent !important;
  border-bottom-color: #1a1a1a !important;
}
.room-item:hover { background: #0d0d0d !important; }
.room-name { color: #fff !important; }
.room-last { color: #8a8a8a !important; }
.room-time { color: #6a6a6a !important; }

/* 聊天详情 */
#view-room { background: #000 !important; }
.chat-header {
  background: #000 !important;
  border-bottom-color: #1f1f1f !important;
}
#room-title { color: #fff !important; }
.chat-body { background: #000 !important; }
.bubble {
  background: #1c1c1e !important;
  color: #fff !important;
}
.chat-row.mine .bubble {
  background: #2ec4a6 !important;
  color: #fff !important;
}
.chat-composer {
  background: #0a0a0a !important;
  border-top-color: #1f1f1f !important;
}
.chat-composer input {
  background: #161616 !important;
  border-color: #2a2a2a !important;
  color: #fff !important;
}

/* 用户详情 */
#view-user { background: #000 !important; }
.user-section {
  background: #111 !important;
  border-color: #222 !important;
}
.user-hero h2 { color: #fff !important; }
.user-bio { color: #d0d0d0 !important; }

/* 帖子 / 评论 */
.messages li {
  background: #1c1c1e !important;
  color: #fff !important;
}

/* 按钮 */
.btn-ghost {
  background: #161616 !important;
  border-color: #262626 !important;
  color: #fff !important;
}
.btn-ghost .btn-title { color: #fff !important; }
.btn-ghost .btn-sub { color: #8a8a8a !important; }

.hdr-pill, .hdr-round {
  background: #1c1c1e !important;
  color: #d0d0d0 !important;
}

.btn-mini {
  background: #1c1c1e !important;
  border-color: #2a2a2a !important;
  color: #d0d0d0 !important;
}

/* 文本 */
.muted { color: #6a6a6a !important; }
.acct-hint { color: #7a7a7a !important; }
.msg { color: #b0b0b0 !important; }

/* 滚动条 */
::-webkit-scrollbar-thumb { background: #2a2a2a !important; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a !important; }

/* 日志 */
.log {
  background: rgba(10, 10, 10, .96) !important;
  border-color: #1f1f1f !important;
  color: #6a6a6a !important;
}

/* ── 我的页面 ─────────────────────── */
.my-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 16px 22px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 18px;
}

.my-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #1a2a26;
  color: #2ec4a6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
  overflow: hidden;
  box-shadow: 0 0 0 2px #2ec4a6;
}

.my-avatar img { width: 100%; height: 100%; object-fit: cover; }

.my-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.my-meta {
  margin: 0;
  font-size: 13px;
  color: #8a8a8a;
}

.my-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.my-act {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  background: #161616;
  border: 1px solid #262626;
  color: #d0d0d0;
  font-size: 14px;
  font-weight: 500;
}

.my-act:hover { background: #1e1e1e; }

.my-info {
  margin-top: 16px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  overflow: hidden;
}

.my-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 13px;
}

.my-info-row:last-child { border-bottom: none; }
.my-info-row > span:first-child { color: #7a7a7a; }
.my-info-row > span:last-child { color: #d0d0d0; }
.mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  word-break: break-all;
  text-align: right;
  max-width: 60%;
}
/* ── 顶栏：标题绝对居中 ───────────────── */
.app-header {
  position: relative !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
}

.hdr-title {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #2ec4a6 !important;
  white-space: nowrap;
}
/* ── 用户列表卡片 ─────────────────── */
.list li .avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a2a26;
  color: #2ec4a6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 0 0 0 1.5px #2ec4a6;
}

.list li .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.list li .meta { flex: 1; min-width: 0; }
.list li .t {
  font-size: 15px;
  color: #fff;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list li .t strong { font-weight: 600; }
.list li .t .sub {
  color: #8a8a8a;
  font-weight: 400;
  font-size: 12.5px;
}
.list li .s {
  font-size: 12.5px;
  color: #8a8a8a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 发送中的消息（本地占位） */
.chat-row.pending .bubble {
  opacity: .6;
}
.chat-row.pending .bubble-time {
  color: #2ec4a6 !important;
  font-style: italic;
}
.bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 76%;
}
.chat-row.mine .bubble-wrap {
  align-items: flex-end;
}
.bubble-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  align-self: flex-end;
  flex: 0 0 30px;
}
#btn-send:disabled {
  opacity: .5;
}