/* ============================================================
   医学教材知识库 · 样式
   配色：医学蓝白为主，专业稳重，长时间阅读舒适
   ============================================================ */

:root {
  --blue-900: #0f3a5f;
  --blue-700: #1a5f9e;
  --blue-600: #2563a8;
  --blue-100: #e6f0f8;
  --blue-50:  #f3f8fc;
  --bg:       #f7f9fb;
  --surface:  #ffffff;
  --text:     #233240;
  --text-2:   #5a6b7b;
  --border:  #dce4ec;
  --accent:   #c0392b;       /* 鉴别/警示用暗红 */
  --green:    #1e7e4f;       /* 治疗有效色 */
  --shadow:   0 1px 3px rgba(15,58,95,.06), 0 4px 16px rgba(15,58,95,.05);
  --radius:   8px;
  --topbar-h: 56px;
  --sidebar-w: 280px;
  --toc-w:    200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #fef3c7; /* 浅黄色背景，测试可见 */
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部栏 ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--blue-900);
  color: #fff;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.topbar-datetime {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  opacity: 0.9;
  line-height: 1.2;
}
#currentDate, #currentWeekday {
  font-size: 10px;
  opacity: 0.8;
}
#currentTime {
  font-size: 13px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}
.brand { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; }
.brand-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: #fff; color: var(--blue-700);
  font-weight: 700; font-size: 16px;
}
.brand-text { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.brand-sub { font-size: 12px; opacity: .7; }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; padding: 6px;
  flex-direction: column; justify-content: space-around;
}
.menu-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; }

.search-box { position: relative; flex: 1; max-width: 480px; margin-left: auto; }
.search-box input {
  width: 100%; height: 36px;
  border: none; border-radius: 18px;
  padding: 0 16px;
  font-size: 14px;
  background: rgba(255,255,255,.15);
  color: #fff;
  outline: none;
  transition: background .2s;
}
.search-box input::placeholder { color: rgba(255,255,255,.6); }
.search-box input:focus { background: rgba(255,255,255,.25); }

.search-results {
  position: absolute; top: 42px; left: 0; right: 0;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 60vh; overflow-y: auto;
  display: none;
}
.search-results.open { display: block; }
.search-item {
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.search-item:hover { background: var(--blue-50); }
.search-item .si-name { font-weight: 600; color: var(--blue-700); }
.search-item .si-path { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.search-empty { padding: 14px; color: var(--text-2); font-size: 13px; }

/* ===== 布局 ===== */
.layout {
  display: flex;
  padding-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h) - 40px);
}

/* ===== 左侧导航 ===== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  position: fixed;
  top: var(--topbar-h); bottom: 0; left: 0;
  z-index: 90;
}
.sidebar-banner {
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.sidebar-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.nav { padding: 12px 0 24px; }

.nav-subject {
  font-size: 14px; font-weight: 700;
  padding: 10px 16px 6px;
  color: var(--blue-900);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.nav-subject:hover { background: var(--blue-50); }
.nav-subject .arrow { transition: transform .2s; font-size: 12px; color: var(--text-2); }
.nav-subject.collapsed .arrow { transform: rotate(-90deg); }

.nav-system {
  font-size: 13.5px; font-weight: 600;
  padding: 6px 16px 6px 28px;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.nav-system:hover { background: var(--blue-50); }
.nav-system .arrow { font-size: 11px; color: var(--text-2); transition: transform .2s; }
.nav-system.collapsed .arrow { transform: rotate(-90deg); }

.nav-disease {
  font-size: 13px;
  padding: 5px 16px 5px 44px;
  color: var(--text-2);
  cursor: pointer;
  border-left: 3px solid transparent;
  display: block;
}
.nav-disease:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-disease.active {
  background: var(--blue-100);
  color: var(--blue-900);
  border-left-color: var(--blue-700);
  font-weight: 600;
}

.sidebar-mask { display: none; }

/* ===== 内容区 ===== */
.content {
  flex: 1;
  margin-left: var(--sidebar-w);
  margin-right: var(--toc-w);
  padding: 28px 36px;
  max-width: 900px;
}

/* 欢迎页 */
.welcome { padding: 40px 0; }
.welcome-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue-700);
}
.welcome-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  color: var(--blue-900);
}
.welcome-desc { color: var(--text-2); margin: 0 0 28px; font-size: 15px; }
.welcome-stats {
  display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap;
}
.welcome-stats .stat { }
.welcome-stats .stat-num { font-size: 28px; font-weight: 700; color: var(--blue-700); }
.welcome-stats .stat-label { font-size: 13px; color: var(--text-2); }
.welcome-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue-700); color: #fff; border: none;
  padding: 10px 20px; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost {
  background: transparent; color: var(--blue-700);
  border: 1px solid var(--blue-700);
  padding: 10px 20px; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn-ghost:hover { background: var(--blue-50); }

/* ===== 疾病详情 ===== */
.disease {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.disease.hidden { display: none; }

.disease-header {
  border-bottom: 2px solid var(--blue-100);
  padding-bottom: 16px; margin-bottom: 24px;
}
.disease-breadcrumb {
  font-size: 12px; color: var(--text-2); margin-bottom: 8px;
}
.disease-title {
  margin: 0; font-size: 26px; color: var(--blue-900);
}
.disease-meta {
  margin-top: 8px; font-size: 13px; color: var(--text-2);
}

.section { margin-bottom: 32px; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.section h2 {
  font-size: 18px;
  color: var(--blue-900);
  border-left: 4px solid var(--blue-700);
  padding-left: 10px;
  margin: 0 0 14px;
}
.section h3 {
  font-size: 15px; color: var(--blue-700);
  margin: 18px 0 8px;
}
.section p { margin: 0 0 10px; }
.section ul, .section ol { margin: 6px 0 12px; padding-left: 22px; }
.section li { margin-bottom: 5px; }

.treat-block {
  background: var(--blue-50);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 10px 0;
}
.treat-block h4 {
  margin: 0 0 8px; font-size: 14px; color: var(--blue-900);
}
.dx-formula {
  background: #fff8e6;
  border-left: 4px solid #e0a800;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 4px;
  font-size: 14px;
}
.dx-basis li strong { color: var(--blue-900); }
.diff-table {
  width: 100%; border-collapse: collapse; margin: 10px 0;
  font-size: 14px;
}
.diff-table th, .diff-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.diff-table th {
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 600;
}
.guide-tag {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== 右侧页内目录 ===== */
.toc {
  width: var(--toc-w);
  flex-shrink: 0;
  position: fixed;
  top: calc(var(--topbar-h) + 20px);
  right: 20px;
  font-size: 13px;
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow-y: auto;
}
.toc-title {
  font-weight: 700; color: var(--text-2);
  font-size: 12px; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 1px;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text-2); display: block; padding: 3px 8px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--blue-700); text-decoration: none; background: var(--blue-50); }
.toc a.active { color: var(--blue-700); border-left-color: var(--blue-700); font-weight: 600; }

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .toc { display: none; }
  .content { margin-right: 0; }
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 280px;
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask {
    display: block;
    position: fixed; inset: var(--topbar-h) 0 0 0;
    background: rgba(0,0,0,.3);
    z-index: 85;
  }
  .sidebar-mask.open { display: block; }
  .content {
    margin-left: 0;
    padding: 20px 16px;
  }
  .disease { padding: 20px 18px; }
  .welcome-card { padding: 28px 20px; }
  .brand-sub { display: none; }
  .search-box { max-width: none; }
}

/* ===== 顶部栏用户区 ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.user-info {
  font-size: 13px;
  color: var(--text-2);
}
.logout-link {
  font-size: 13px;
  color: var(--blue-700);
  text-decoration: none;
  cursor: pointer;
}
.logout-link:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .header-right { gap: 8px; }
  .user-info { display: none; }
}

/* ===== 顶部我的中心 ===== */
.my-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.user-info-block {
  display: flex; flex-direction: column; gap: 2px;
}
.user-name {
  font-size: 14px; font-weight: 600; color: #fff;
  line-height: 1.2;
}
.user-meta {
  font-size: 11px; color: rgba(255,255,255,.75);
}
.member-tag {
  background: rgba(255,255,255,.15);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}
.clock-block {
  text-align: right;
  display: flex; flex-direction: column; gap: 1px;
}
.clock-time {
  font-size: 16px; font-weight: 600; color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  font-size: 11px; color: rgba(255,255,255,.7);
}

/* ===== 底部状态栏 ===== */
.status-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 44px;
  background: var(--blue-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,.15);
}
.status-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  flex: 1;
}
.status-label {
  font-size: 10px; color: rgba(255,255,255,.6);
}
.status-value {
  font-size: 13px; font-weight: 600; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* 内容区底部留白（避免被状态栏遮挡） */
.content {
  padding-bottom: 60px !important;
}

/* ============================================================
   新主页布局：卡片式栏目
   ============================================================ */

.main-container {
  padding: 70px 16px 70px;
  max-width: 768px;
  margin: 0 auto;
}

/* 搜索栏 */
.search-section {
  margin-bottom: 16px;
}
.search-section input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d4e4d4;
  border-radius: 12px;
  background: #fefce8;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.search-section input:focus {
  border-color: #166534;
  background: #fff;
}

/* 功能按钮行 */
.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.feature-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: #334155;
}
.feature-btn:active {
  transform: scale(0.96);
  background: #f1f5f9;
}
.feature-icon {
  font-size: 22px;
}

/* 学科卡片网格 */
.subject-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: #e0f2fe;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.subject-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #f1f5f9;
}
.subject-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.subject-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 6px;
}
.subject-card-count {
  font-size: 12px;
  color: #94a3b8;
}

/* 系统列表视图 */
.system-view {
  padding-bottom: 20px;
}
.system-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.back-btn {
  padding: 8px 16px;
  background: #166534;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.system-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a365d;
}
.system-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.system-item {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.system-item:active {
  background: #f1f5f9;
}
.system-item-name {
  font-size: 15px;
  color: #334155;
  font-weight: 500;
}
.system-item-count {
  font-size: 12px;
  color: #94a3b8;
}

/* 疾病详情视图 */
.disease-view {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.disease-view.hidden {
  display: none;
}
.disease-back {
  margin-bottom: 16px;
}

/* Toast提示 */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  animation: fadeInOut 2s ease;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  20% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ============================================================
   弹窗样式
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 16px;
  font-weight: 600;
  color: #1a365d;
}
.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body {
  padding: 12px 20px 20px;
  overflow-y: auto;
}
.modal-system-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  border-radius: 8px;
}
.modal-system-item:active {
  background: #f1f5f9;
}
.modal-system-item:last-child {
  border-bottom: none;
}
.modal-system-name {
  font-size: 15px;
  color: #334155;
  font-weight: 500;
}
.modal-system-count {
  font-size: 12px;
  color: #94a3b8;
}

/* ============================================================
   新顶部栏样式
   ============================================================ */
.topbar {
  justify-content: space-between;
}
.topbar-title {
  font-size: 17px;
  font-weight: 600;
}
.my-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.my-btn:active {
  background: rgba(255,255,255,0.25);
}

/* 我的弹窗内容 */
.my-info-item {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.my-info-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.my-info-value {
  font-size: 15px;
  color: #1a365d;
  font-weight: 500;
}
.my-logout-btn {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}

.admin-entry-btn {
  margin-top: 6px;
  width: 100%;
  padding: 10px;
  background: #1a5f9e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.admin-entry-btn:active {
  background: #154a7d;
}

/* 疾病详情样式 */
.disease-section {
  margin-bottom: 20px;
}
.disease-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #1a5f9e;
}
.disease-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 8px;
  padding-left: 10px;
}
.diagnosis-formula {
  background: #fef3c7;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

/* 全屏页面视图 */
.full-page-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8fafc;
  z-index: 200;
  display: none;
  flex-direction: column;
}
.full-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--blue-900);
  color: #fff;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.back-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.back-btn:active {
  background: rgba(255,255,255,0.25);
}
.full-page-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.full-page-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* 列表项样式 */
.list-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
}
.list-item:active {
  background: #f1f5f9;
}
.list-item-name {
  font-size: 15px;
  color: #1a365d;
  font-weight: 500;
}
.list-item-count {
  font-size: 13px;
  color: #94a3b8;
}
.system-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-top: 8px;
  margin-bottom: 10px;
  background: #f0f7ff;
  border-radius: 10px;
  cursor: pointer;
  border-left: 4px solid #2563eb;
}
.system-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #2563eb;
}
.system-group-arrow {
  font-size: 14px;
  color: #2563eb;
  font-weight: bold;
}
.system-group-content {
  display: none;
  margin-bottom: 10px;
}

/* 我的弹窗新设计 */
.my-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(135deg, #1a5f9e 0%, #0f3a5f 100%);
  color: #fff;
  border-radius: 14px 14px 0 0;
  position: relative;
}
.my-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}
.my-user-info {
  flex: 1;
}
.my-username {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.my-member-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.my-modal-header .modal-close {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.my-info-list {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 16px;
  margin-bottom: 16px;
}
.my-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}
.my-info-value {
  font-size: 14px;
  color: #1a365d;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
}
.device-code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}
.copy-btn {
  background: #e0f2fe;
  color: #0369a1;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:active {
  background: #bae6fd;
}
.copy-btn.copied {
  background: #dcfce7;
  color: #166534;
}
.my-info-row:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .clock-block { display: none; }
  .member-tag { font-size: 10px; }
  .status-bar { height: 48px; }
  .status-value { font-size: 12px; }
}

/* ============================================================
   悬浮导航按钮
   ============================================================ */
.float-nav-buttons {
  position: fixed;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}
.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-700);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15,58,95,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: transform 0.15s;
}
.float-btn:active {
  transform: scale(0.95);
}
.float-home {
  background: var(--green);
}
.float-btn .icon {
  font-size: 18px;
  margin-bottom: 2px;
}

/* ============================================================
   搜索结果样式
   ============================================================ */
.search-results {
  margin: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--blue-50);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}
.clear-search-btn {
  padding: 4px 12px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}
.search-results-list {
  max-height: 60vh;
  overflow-y: auto;
}
.search-section input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}
.search-section input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 168, 0.1);
}

/* ===== 加载动画 ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
