/* ==========================================================================
   侧边栏布局（单页应用）
   ========================================================================== */

#app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---------- 侧边栏 ---------- */

.sidebar {
  width: 228px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(16, 16, 24, 0.72);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  padding: 22px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 14px var(--neon);
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.3;
  margin-top: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  margin-top: 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  position: relative;
  transition: color .15s, background .15s;
}
.nav-item:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.nav-item.active {
  color: var(--neon-light);
  background: rgba(124, 58, 237, 0.13);
}
/* 左侧霓虹竖条 */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
}
.nav-icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
  opacity: .85;
  flex-shrink: 0;
}
.nav-label { flex: 1; }

/* ---------- 侧边栏底部（钱包） ---------- */

.sidebar-foot {
  position: relative;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sidebar-foot .wallet-btn {
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .6);
  animation: menuIn .16s ease-out;
  z-index: 200;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.wallet-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}
.wallet-menu-addr {
  font-size: 11px;
  word-break: break-all;
  line-height: 1.4;
  margin-top: 3px;
}
.wallet-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s;
}
.wallet-menu button:hover { background: var(--bg-hover); }
.wallet-menu button.danger { color: var(--err); }
.wallet-menu button.danger:hover { background: rgba(239, 68, 68, .12); }

/* ---------- 内容区 ---------- */

.content {
  flex: 1;
  min-width: 0;
  padding: 40px 40px 80px;
  max-width: 860px;
}

.content-head {
  margin-bottom: 28px;
}
.content-head h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  background: linear-gradient(135deg, #fff 0%, var(--neon-light) 55%, var(--neon-2-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.content-head p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-top: 7px;
}

/* ---------- 移动端抽屉 ---------- */

.drawer-toggle {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 300;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 90;
}

@media (max-width: 820px) {
  .drawer-toggle { display: block; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .22s ease-out;
    width: 250px;
    height: 100vh;
  }
  body.drawer-open .sidebar { transform: translateX(0); }
  body.drawer-open .drawer-backdrop { display: block; }

  .content {
    padding: 76px 18px 60px;
    max-width: none;
  }
  .content-head { margin-bottom: 22px; }
}

/* ---------- 标签页（我的名字页） ---------- */

.tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: rgba(124, 58, 237, .18);
  color: var(--neon-light);
}

/* ---------- 分区（管理页） ---------- */

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.section-num {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  background: rgba(124, 58, 237, .15);
  color: var(--neon-light);
  border: 1px solid rgba(124, 58, 237, .35);
}
.section-title { font-weight: 600; font-size: 15px; }
.section-desc { font-size: 12.5px; color: var(--text-mute); margin-left: auto; }

.checkline {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; cursor: pointer;
}
.checkline input {
  width: 16px; height: 16px;
  accent-color: var(--neon);
  cursor: pointer;
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 12px 14px;
  outline: none;
  line-height: 1.6;
}
textarea:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}
