/* ========== 04-profile.css ========== */

/* ===== iMessage Bottom Tabs ===== */
.imsg-bottom-tabs {
  display: flex;
  background: rgba(248, 248, 250, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid #e5e5ea;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.imsg-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  cursor: pointer;
}

.imsg-bottom-tab svg {
  width: 24px;
  height: 24px;
  stroke: #8e8e93;
  fill: none;
  stroke-width: 1.5;
  transition: stroke .2s;
}

.imsg-bottom-tab span {
  font-size: 10px;
  color: #8e8e93;
  font-weight: 500;
  transition: color .2s;
}

.imsg-bottom-tab.active svg { stroke: #1d1d1f; }
.imsg-bottom-tab.active span { color: #1d1d1f; font-weight: 600; }
.imsg-bottom-tab:active { opacity: .6; }

.imsg-tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
}

.imsg-tab-content.active {
  display: flex;
  flex-direction: column;
}

/* ===== Profile Hero ===== */
.profile-hero {
  margin: 20px 16px;
  background: #1d1d1f;
  border-radius: 20px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}

.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .2);
  position: relative;
  transition: transform .15s;
}

.profile-avatar-lg:active { transform: scale(.95); }

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-lg svg {
  width: 36px;
  height: 36px;
  stroke: rgba(255, 255, 255, .5);
  fill: none;
  stroke-width: 1.5;
}

.profile-avatar-lg input { display: none; }

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.profile-avatar-edit svg {
  width: 12px;
  height: 12px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 2;
}

.profile-name-area { margin-top: 14px; text-align: center; }

.profile-name-display {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 8px;
}

.profile-name-display:active { background: rgba(255, 255, 255, .1); }

.profile-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
  margin-top: 6px;
}

/* ===== Account Info Card ===== */
.acct-info-card {
  margin: 0 16px 8px;
}

.acct-info-row {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ececec;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .03);
}

.acct-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acct-info-icon {
  width: 20px;
  height: 20px;
  stroke: #8e8e93;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.acct-info-label {
  font-size: 11px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.acct-info-name {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 600;
  margin-top: 1px;
}

.acct-info-badge {
  font-size: 12px;
  color: #8e8e93;
  background: #f2f2f7;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 500;
}

/* ===== Mask Section ===== */
.mask-section-header {
  padding: 20px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mask-section-header span {
  font-size: 13px;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

.mask-section-header button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #3a3a3c;
  font-weight: 600;
}

.mask-section-header button svg {
  width: 16px;
  height: 16px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 2;
}

/* ===== Mask Card ===== */
.mask-card {
  margin: 0 16px 10px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  border: 1px solid #ececec;
  transition: transform .12s;
}

.mask-card:active { transform: scale(.98); }

.mask-card .mc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5e5ea;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mask-card .mc-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mask-card .mc-avatar svg {
  width: 24px;
  height: 24px;
  stroke: #8e8e93;
  fill: none;
  stroke-width: 1.5;
}

.mask-card .mc-info { flex: 1; min-width: 0; }
.mask-card .mc-name { font-size: 16px; font-weight: 600; color: #1d1d1f; }

.mask-card .mc-desc {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mask-card .mc-chars { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

.mask-card .mc-char-tag {
  padding: 2px 8px;
  background: #f2f2f7;
  border-radius: 4px;
  font-size: 10px;
  color: #3a3a3c;
  font-weight: 500;
}

.mask-card .mc-arrow { color: #c7c7cc; font-size: 18px; flex-shrink: 0; }

.mask-empty { text-align: center; padding: 40px 30px; color: #8e8e93; }

.mask-empty svg {
  width: 44px;
  height: 44px;
  stroke: #d1d1d6;
  fill: none;
  stroke-width: 1;
  margin-bottom: 10px;
}

.mask-empty p { font-size: 14px; line-height: 1.5; }

/* ===== Sticker Import ===== */
.sticker-import-section {
  margin: 0 16px 16px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ececec;
}

.sticker-import-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f2f2f7;
  transition: background .15s;
}

.sticker-import-row:last-child { border-bottom: none; }
.sticker-import-row:active { background: #f9f9fb; }

.sticker-import-row svg {
  width: 22px;
  height: 22px;
  stroke: #3a3a3c;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.sticker-import-row .sir-info { flex: 1; }
.sticker-import-row .sir-title { font-size: 15px; color: #1d1d1f; font-weight: 500; }
.sticker-import-row .sir-sub { font-size: 12px; color: #8e8e93; margin-top: 1px; }
.sticker-import-row .sir-arrow { color: #c7c7cc; font-size: 16px; }

.sticker-preview-grid {
  display: flex;
  gap: 6px;
  padding: 10px;
  flex-wrap: wrap;
  margin: 0 16px 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ececec;
}

.sticker-preview-grid .sp-item {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f2f2f7;
}

.sticker-preview-grid .sp-item img { width: 100%; height: 100%; object-fit: contain; }

.sticker-preview-grid .sp-item .sp-del {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #ff3b30;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.sticker-preview-grid .sp-item .sp-del svg {
  width: 8px;
  height: 8px;
  stroke: #fff;
  stroke-width: 3;
}


/* =========================================================
   ★★★ 创建账号模态框 — 全新美化样式
   ========================================================= */

/* 卡片容器 */
.acct-modal-card {
  width: 92%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, .08),
    0 1px 4px rgba(0, 0, 0, .04);
  overflow: hidden;
  animation: acctModalIn .28s cubic-bezier(.2, .9, .3, 1);
}

@keyframes acctModalIn {
  from {
    opacity: 0;
    transform: scale(.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 顶栏 */
.acct-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.acct-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #333333;
  letter-spacing: -.2px;
}

.acct-modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}

.acct-modal-close:hover {
  background: #e5e5e5;
}

.acct-modal-close:active {
  background: #d8d8d8;
}

.acct-modal-close svg {
  width: 12px;
  height: 12px;
  stroke: #888888;
  fill: none;
  stroke-width: 2;
}

/* 内容区 */
.acct-modal-body {
  padding: 24px 24px 8px;
}

/* 头像区域 */
.acct-modal-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.acct-modal-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fafafa;
  border: 2px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .2s, background .2s, transform .15s;
}

.acct-modal-avatar:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.acct-modal-avatar:active {
  transform: scale(.95);
}

.acct-modal-avatar svg {
  width: 34px;
  height: 34px;
  stroke: #ccc;
  fill: none;
  stroke-width: 1.2;
}

.acct-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

/* 相机角标 */
.acct-modal-avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  pointer-events: none;
}

.acct-modal-avatar-badge svg {
  width: 13px;
  height: 13px;
  stroke: #888;
  fill: none;
  stroke-width: 1.4;
}

.acct-modal-avatar-hint {
  font-size: 12px;
  color: #bbb;
  margin-top: 8px;
  letter-spacing: .2px;
}

/* 输入框组 */
.acct-modal-input-group {
  margin-bottom: 8px;
}

.acct-modal-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.acct-modal-input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1.5px solid #e0e0e0;
  outline: none;
  font-size: 16px;
  color: #333;
  padding: 10px 0;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: border-color .2s;
}

.acct-modal-input::placeholder {
  color: #bbb;
  font-weight: 400;
}

.acct-modal-input:focus {
  border-bottom-color: #999;
}

/* 底部按钮 */
.acct-modal-footer {
  display: flex;
  padding: 16px 24px 20px;
  gap: 12px;
}

.acct-modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background .15s, transform .1s;
}

.acct-modal-btn:active {
  transform: scale(.97);
}

.acct-modal-btn.cancel {
  background: #f5f5f5;
  color: #888;
}

.acct-modal-btn.cancel:hover {
  background: #ececec;
}

.acct-modal-btn.confirm {
  background: #333;
  color: #fff;
}

.acct-modal-btn.confirm:hover {
  background: #444;
}

.acct-modal-btn.confirm:active {
  background: #555;
}


/* =========================================================
   ★★★ 账号切换抽屉 — 全新美化样式
   ========================================================= */

/* 遮罩容器 */
.acct-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  pointer-events: none;
}

.acct-drawer-mask.show {
  display: block;
  pointer-events: auto;
}

/* 半透明遮罩 */
.acct-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background .3s ease;
}

.acct-drawer-mask.visible .acct-drawer-overlay {
  background: rgba(0, 0, 0, .3);
}

/* 面板 */
.acct-drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: #ffffff;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .06);
  z-index: 1;
}

.acct-drawer-mask.visible .acct-drawer-panel {
  transform: translateX(0);
}

/* ★ 抽屉头部 */
.acct-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.acct-drawer-header-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acct-drawer-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
}

.acct-drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
  letter-spacing: -.3px;
}

.acct-drawer-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
  margin-top: 4px;
}

.acct-drawer-close:hover {
  background: #e5e5e5;
}

.acct-drawer-close:active {
  background: #d8d8d8;
}

.acct-drawer-close svg {
  width: 12px;
  height: 12px;
  stroke: #888;
  fill: none;
  stroke-width: 2;
}

/* ★ 账号列表 */
.acct-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

/* ★ 单条账号 */
.acct-item {
  display: flex;
  align-items: center;
  padding: 12px 12px;
  gap: 12px;
  cursor: pointer;
  border-radius: 12px;
  min-height: 56px;
  box-sizing: border-box;
  margin-bottom: 2px;
  transition: background .15s;
  border-bottom: none;
  position: relative;
}

.acct-item:hover {
  background: #fafafa;
}

.acct-item:active {
  background: #f0f0f0;
}

/* ★ 选中 / 当前账号 */
.acct-item.active {
  background: #f5f5f5;
}

.acct-item.active .acct-item-name {
  font-weight: 700;
  color: #333;
}

/* ★ 不加 border-bottom，用间距代替 */
.acct-item + .acct-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 60px;
  right: 12px;
  height: 1px;
  background: #f0f0f0;
}

/* ★ 头像 */
.acct-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.acct-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acct-item-avatar svg {
  width: 20px;
  height: 20px;
  stroke: #bbb;
  fill: none;
  stroke-width: 1.5;
}

/* ★ 信息 */
.acct-item-info {
  flex: 1;
  min-width: 0;
}

.acct-item-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.acct-item-label {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  letter-spacing: .2px;
}

/* ★ 对勾标记 */
.acct-item-check-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acct-item-check {
  width: 18px;
  height: 18px;
  stroke: #333;
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ★ 删除按钮 */
.acct-item-del {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background .15s;
}

.acct-item-del:hover {
  background: rgba(0, 0, 0, .04);
}

.acct-item-del:hover svg {
  stroke: #ff3b30;
}

.acct-item-del:active {
  background: rgba(255, 59, 48, .08);
}

.acct-item-del svg {
  width: 15px;
  height: 15px;
  stroke: #ccc;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s;
}

/* ★ 底部 */
.acct-drawer-footer {
  padding: 12px 16px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.acct-drawer-add {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: background .15s, transform .1s;
}

.acct-drawer-add:hover {
  background: #efefef;
}

.acct-drawer-add:active {
  background: #e8e8e8;
  transform: scale(.98);
}

.acct-drawer-add svg {
  width: 15px;
  height: 15px;
  stroke: #888;
  fill: none;
  stroke-width: 2;
}


/* =========================================================
   账号统计行（角色/对话/动态数量）
   ========================================================= */
.acct-stats-row {
  display: flex;
  margin: 8px 16px 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ececec;
  overflow: hidden;
}

.acct-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 2px;
  border-right: 1px solid #f2f2f7;
}

.acct-stat:last-child {
  border-right: none;
}

.acct-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
}

.acct-stat-label {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 500;
}
