:root {
  /* 宇宙深空黑 */
  --bg: #000212;
  
  /* 玻璃材质变量 */
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shine: rgba(255, 255, 255, 0.3);
  
  /* 文本颜色 */
  --text: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-tertiary: rgba(235, 235, 245, 0.3);
  
  /* 霓虹强调色 */
  --accent-primary: #0a84ff;   /* iOS Blue */
  --accent-secondary: #5e5ce6; /* iOS Indigo */
  --accent-success: #32d74b;   /* iOS Green */
  --accent-danger: #ff453a;    /* iOS Red */
  
  /* 阴影与圆角 */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  
  /* 字体栈 */
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.theme-light {
  /* 背景改为 iOS 浅灰 */
  --bg: #f2f2f7;
  
  /* 玻璃变白 */
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shine: rgba(255, 255, 255, 0.8);
  
  /* 文字变黑 */
  --text: #000000;
  --text-secondary: rgba(60, 60, 67, 0.6);
  --text-tertiary: rgba(60, 60, 67, 0.3);
  
  /* 阴影变淡 */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 针对明亮模式的特殊微调 */
body.theme-light .favicon {
  background: rgba(0, 0, 0, 0.05); /* 图标底座变深一点点以便区分 */
  box-shadow: none;
}
body.theme-light .icon-btn {
  background: rgba(255, 255, 255, 0.8); /* 按钮变白 */
  color: #000;
  border-color: rgba(0,0,0,0.1);
}
body.theme-light .nav-chip {
  background: rgba(0,0,0,0.05);
  color: #666;
}
body.theme-light .nav-chip.active {
  color: #fff; /* 选中还是白色 */
}

/* --- 🌈 多彩模式 (Cyber/Colorful) --- */
/* 类似于 Cyberpunk 风格，更强的霓虹感 */
body.theme-colorful {
  --bg: #2b0052; /* 深紫背景 */
  --glass-bg: linear-gradient(135deg, rgba(255, 0, 128, 0.15), rgba(0, 200, 255, 0.15));
  --glass-border: rgba(255, 255, 255, 0.2);
  --text: #fff;
  
  /* 强化的光球效果 (通过 JS 改变 Orb 颜色太复杂，我们用 CSS filter 偷懒) */
}
body.theme-colorful .background-glow {
  filter: hue-rotate(45deg) blur(60px); /* 整体色调偏移 */
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  padding: 40px clamp(16px, 5vw, 60px);
  overflow-x: hidden;
  /* 使得滚动更平滑 */
  scroll-behavior: smooth;
}

/* =========================================
   1. 动态液态背景 (Liquid Background)
   ========================================= */
.background-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.orb-2 {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
  bottom: 10%;
  right: -5%;
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}

.orb-3 {
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, var(--accent-success), transparent 70%);
  top: 40%;
  left: 30%;
  opacity: 0.3;
  animation-duration: 20s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -50px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.9); }
}

/* =========================================
   2. 玻璃拟态基础 (Glassmorphism)
   ========================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-shine);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
}

/* =========================================
   3. 布局与头部 (居中 Hero 风格重构)
   ========================================= */
.page-header {
  position: relative; /* 为了放置绝对定位的按钮 */
  display: flex;
  flex-direction: column;
  align-items: center; /* 水平居中 */
  justify-content: center;
  margin-bottom: 40px;
  padding: 20px 0;
  text-align: center;
}

/* --- 个人身份区 (居中布局) --- */
.profile-section {
  display: flex;
  flex-direction: column; /* 上下图文 */
  align-items: center;
  gap: 16px;
}

/* 头像容器 */
.avatar-box {
  position: relative;
  width: 80px;   /* 整体尺寸 */
  height: 80px;
  border-radius: 50%;
  
  /* 核心：利用 padding 留出空隙显示背景 */
  padding: 3px; 
  
  /* 这里是那个彩色的圆环渐变 */
  background: linear-gradient(135deg, #0a84ff, #bf5af2, #ff9f0a);
  background-size: 200% 200%;
  animation: borderRotate 4s ease infinite; /* 让圆环颜色缓缓流动 */
  
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); /* 加强阴影 */
  flex-shrink: 0;
}

/* 明亮模式下，减弱头像阴影 */
body.theme-light .avatar-box {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.avatar-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg); /* 加粗隔离边框 */
  background-color: var(--bg);
}

/* 文字信息 */
.info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.info-box h1 {
  font-size: 36px; /* 再次加大一点，更霸气 */
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  
  /* 🟢 修复 'g' 被切：行高设为 1.3，底部多留 10px */
  line-height: 1.3; 
  padding-bottom: 10px;
  /* 抵消掉 padding 带来的位移，保持视觉居中 */
  margin-bottom: -10px;

  /* 默认深色模式：白色流光渐变 */
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 增加文字阴影，防止背景太亮时看不清 */
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

/* 🟢 修复白色主题看不清 */
body.theme-light .info-box h1 {
  /* 改为深灰色渐变 */
  background: linear-gradient(180deg, #2c3e50 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none; /* 白色主题不需要太重的阴影 */
}

/* "Designed by 不鹤" 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 100px; /* 胶囊形状 */
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge .highlight {
  color: #fff;
  font-weight: 600;
}

body.theme-light .badge {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.05);
}

/* --- 右侧按钮组 (改为绝对定位悬浮在右上角) --- */
.action-section {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 12px;
}

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 玻璃按钮样式 */
.circle-btn.glass {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.circle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(5deg); /* 悬停时轻微旋转放大，很好玩 */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.circle-btn:active {
  transform: scale(0.95);
}

/* 响应式微调 */
@media (max-width: 400px) {
  .info-box h1 { font-size: 20px; }
  .avatar-box { width: 44px; height: 44px; }
  .badge { font-size: 11px; padding: 2px 6px; }
  .circle-btn { width: 40px; height: 40px; }
}

/* =========================================
   4. 按钮与交互
   ========================================= */
.btn {
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 100px; /* 胶囊形状 */
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active { transform: scale(0.96); }

/* 主要按钮：白色发光 */
.btn.primary {
  background: #ffffff;
  color: #000;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}
.btn.primary:hover {
  background: #f0f0f5;
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
}

/* 幽灵按钮 */
.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 玻璃按钮 */
.btn.glass-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: white;
  backdrop-filter: blur(10px);
}
.btn.glass-btn:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
}

.btn.full { width: 100%; }
.btn.small { padding: 8px 16px; font-size: 13px; }

/* =========================================
   5. 分类导航 (Chips)
   ========================================= */
.category-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  
  /* 🟢 修复：增加下方的 padding (从 4px 改为 20px)，给光晕留位置 */
  padding: 10px 4px 20px 4px; 
  
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.nav-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-chip.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(10, 132, 255, 0.4);
}



/* =========================================
   6. Card grid
   ========================================= */
.main {
  max-width: 1200px;
  margin: 0 auto;
}

.link-grid {
  display: grid;
  /* 📉 改动：从 260px 改为 200px，卡片更窄更精致 */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  /* 间距稍微收紧一点点 */
  gap: 16px; 
  align-items: stretch;
}

.card {
  position: relative;
  /* 📉 内边距稍微减小，因为卡片变窄了 */
  padding: 14px; 
  overflow: hidden;
  /* 🍎 iOS 26 风格：加大圆角，极其圆润 */
  border-radius: 24px; 
  
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}

.card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.favicon {
  /* 📉 尺寸缩小：适配窄卡片，比例更协调 */
  width: 48px;
  height: 48px;
  
  /* 🍎 核心：Squircle 圆角逻辑 */
  /* 这里的 14px 是配合卡片 24px 圆角的最佳视觉平衡点 */
  border-radius: 14px; 
  
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-text {
  flex: 1; /* 占满右侧空间 */
  min-width: 0; /* 必须加这个，否则 flex 里的省略号会失效 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中 */
  height: 100%; /* 撑满高度 */
}

.card-text h4 {
  /* 关键：去掉下边距 (原为 margin: 0 0 6px 0) */
  margin: 0; 
  
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  
  /* 保持单行省略号 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* 优化：增加一点行高，防止文字被切 */
  line-height: 1.2;
}

.card-text p {
  display: none; /* 直接隐藏 URL */
}

.card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;     /* 间距缩小 */
  padding: 3px; /* 内边距缩小 */
  
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  transform: translateY(10px) scale(0.9); 
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  pointer-events: none;
}

.card:hover .card-actions {
  opacity: 1;
  pointer-events: auto;
  /* 🚀 最终位置：回到原位，视觉上就是"向上浮出" */
  transform: translateY(0) scale(1);
}

.card:hover .card-actions {
  opacity: 1;
  transform: translateY(0);
}

.icon-btn {
  width: 24px;   /* 📏 再次缩小 */
  height: 24px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
    
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 内部图标也缩小一点 */
.icon-btn svg {
  width: 12px;   /* 📏 对应缩小 */
  height: 12px;
  stroke-width: 2.5px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}


/* 🖱️ 悬停效果：变亮、上浮 */
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px) scale(1.1); /* 微微上浮 */
  box-shadow: 
    inset 0 1px 0px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.2); /* 投影变深 */
}


/* 🔴 删除按钮的特殊液态红 */
.icon-btn.danger:hover {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.8), rgba(255, 59, 48, 0.4));
  color: #fff;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    0 4px 10px rgba(255, 59, 48, 0.4);
}

.card.empty {
  text-align: center;
  border-style: dashed;
  color: var(--text-secondary);
}

/* =========================================
   3. 布局与头部 (居中 Hero 风格重构)
   ========================================= */
.page-header {
  position: relative; /* 为了放置绝对定位的按钮 */
  display: flex;
  flex-direction: column;
  align-items: center; /* 水平居中 */
  justify-content: center;
  margin-bottom: 40px;
  padding: 20px 0;
  text-align: center;
}

/* --- 个人身份区 (居中布局) --- */
.profile-section {
  display: flex;
  flex-direction: column; /* 上下图文 */
  align-items: center;
  gap: 16px;
}

/* 头像容器 */
.avatar-box {
  position: relative;
  width: 80px;   /* 加大头像 */
  height: 80px;
  border-radius: 50%;
  padding: 3px;
  /* 彩色圆环 */
  background: linear-gradient(135deg, #0a84ff, #bf5af2, #ff9f0a);
  background-size: 200% 200%;
  animation: borderRotate 4s ease infinite;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4); /* 加强阴影 */
  flex-shrink: 0;
}

/* 明亮模式下，减弱头像阴影 */
body.theme-light .avatar-box {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.avatar-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg); /* 加粗隔离边框 */
  background-color: var(--bg);
}

/* 文字信息 */
.info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.info-box h1 {
  font-size: 36px; /* 再次加大一点，更霸气 */
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  
  /* 🟢 修复 'g' 被切：行高设为 1.3，底部多留 10px */
  line-height: 1.3; 
  padding-bottom: 10px;
  /* 抵消掉 padding 带来的位移，保持视觉居中 */
  margin-bottom: -10px;

  /* 默认深色模式：白色流光渐变 */
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* 增加文字阴影，防止背景太亮时看不清 */
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

/* 🟢 修复白色主题看不清 */
body.theme-light .info-box h1 {
  /* 改为深灰色渐变 */
  background: linear-gradient(180deg, #2c3e50 0%, #000000 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none; /* 白色主题不需要太重的阴影 */
}

/* "Designed by 不鹤" 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-light .badge {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.05);
}

/* --- 右侧按钮组 (改为绝对定位悬浮在右上角) --- */
.action-section {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 12px;
}



/* ======== 网站状态点 ======== */
.status-indicator {
  position: absolute;
  /* 🟢 修复：移到右下角 */
  right: 14px;
  bottom: 14px; /* 原来可能是 top: 50% */
  top: auto; 
  transform: none;
  
  width: 10px;
  height: 10px;
  border-radius: 50%;
  
  /* 加个强一点的边框，防止和背景色混在一起 */
  border: 2px solid rgba(255,255,255,0.2); 
  box-shadow: 0 0 5px rgba(0,0,0,0.5); /* 加点阴影更清晰 */
  
  z-index: 5;
  transition: all 0.3s ease;
}
/* 状态：正常 */
.status-ok {
  background: var(--accent-success);
  box-shadow: 0 0 10px rgba(50,215,75,0.6);
}

/* 状态：异常 */
.status-bad {
  background: var(--accent-danger);
  box-shadow: 0 0 10px rgba(255,69,58,0.6);
}

/* 状态：检测中 */
.status-loading {
  background: #bbb;
  animation: statusBlink 1.2s infinite ease-in-out;
}

@keyframes statusBlink {
  0% { opacity: .4 }
  50% { opacity: 1 }
  100% { opacity: .4 }
}


/* =========================================
   7. 表单与输入框
   ========================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  position: relative;
}

.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 4px;
}

input, select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
  appearance: none; /* 移除原生样式 */
}

input:focus, select:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
}

/* =========================================
   8. 登录/锁屏 & 模态框
   ========================================= */
.auth-screen, .modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 100;
  background: rgba(0, 2, 18, 0.6);
  backdrop-filter: blur(20px);
  transition: opacity 0.3s ease, visibility 0.3s;
}

.auth-screen.hidden, .modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card, .modal-card {
  width: min(440px, 90vw);
  padding: 32px;
  animation: scaleIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-header {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; box-shadow: 0 0 8px rgba(255, 95, 86, 0.4); }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.auth-body h1 {
  font-size: 28px;
  margin-bottom: 8px;
}
.auth-body p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.auth-error {
  color: var(--accent-danger);
  font-size: 14px;
  min-height: 20px;
  margin-top: 8px;
  text-align: center;
}

/* Modal Specifics */
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.icon-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.small-input {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

/* =========================================
   9. 响应式适配
   ========================================= */
@media (max-width: 400px) {
  .info-box h1 { font-size: 20px; }
  .avatar-box { width: 44px; height: 44px; }
  .badge { font-size: 11px; padding: 2px 6px; }
  .circle-btn { width: 40px; height: 40px; }
}

@media (max-width: 768px) {
  body {
    padding: 20px 16px; /* 减小手机端边距 */
  }

  /* 核心修复：手机上保持“左头像-右按钮”的一行布局 */
  .page-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* ⬆️ 顶部留白加大到 40px (原来是 20px)，给头像腾位置 */
    padding-top: 40px; 
    margin-bottom: 30px;
    gap: 16px; /* 头像和文字之间的间距加大 */
    position: relative;
  }
  .profile-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  /* 调整手机上的头像大小 */
  .avatar-box {
    /* 📏 从 52px 放大到 76px (接近电脑端大小) */
    width: 76px;  
    height: 76px;
    padding: 3px; /* 彩色圆环稍微粗一点 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* 阴影加重，增加立体感 */
  }

  .action-section {
    top: 0;
    right: 0;
    /* 你的按钮已经是绝对定位了，这样它们会悬浮在头像右上侧 */
  }
  
  /* 调整文字大小 */
  .info-box h1 {
    /* 📏 从 20px 放大到 28px */
    font-size: 28px; 
    line-height: 1.2;
    padding-bottom: 4px;
    margin-bottom: -4px;
  }
  .badge {
    font-size: 13px; /* 从 11px 恢复到正常大小 */
    padding: 4px 12px;
  }
  
  /* 如果手机屏幕太窄，可以隐藏 Designed by 标签，只留名字 */
  /* .badge span:first-child { display: none; } */

  /* 调整按钮大小 */
  .circle-btn { width: 40px; height: 40px; }
  .circle-btn svg { width: 18px; height: 18px; }

  /* 调整卡片网格，手机上改为单列或者紧凑双列 */
  .link-grid {
    grid-template-columns: 1fr; /* 强制单列，或者 repeat(2, 1fr) 看你喜好 */
    gap: 16px;
  }
  
  /* 修复操作栏在手机上的位置 */
  .card-actions {
    opacity: 1; /* 手机无法悬停，建议常驻显示或半透明 */
    transform: none;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.4); /* 加个深色底防止看不清 */
    border-radius: 20px;
    padding: 4px;
  }
}

/* =========================================
   🌞 白色主题 (Light Mode) 专属修正
   ========================================= */

/* 1. 修复名字看不见的问题：改为深黑色 */
body.theme-light .badge .highlight {
  color: #000000; /* 纯黑 */
  font-weight: 700;
}

/* 2. 修复分类导航选中状态：改为黑底白字 (iOS 风格) */
body.theme-light .nav-chip.active {
  color: #000000; /* 选中变成黑色实心 */
  background: #ffffff;      /* 文字变成白色 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 柔和的黑色投影 */
  border: none;        /* 去掉边框 */
}

/* 3. 白色主题下，普通未选中的分类稍微深一点，增加对比 */
body.theme-light .nav-chip {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  border: none;
}
body.theme-light .nav-chip:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* =========================================
   ⚪️ 白色主题 - 右上角按钮修正
   ========================================= */
body.theme-light .circle-btn {
  /* 1. 图标颜色：改成纯黑 */
  color: #000000;
  
  /* 2. 背景颜色：改成淡淡的黑色半透明 (让它在白底上显现出来) */
  background: rgba(0, 0, 0, 0.05);
  
  /* 3. 边框颜色：加深一点，增加轮廓感 */
  border-color: rgba(0, 0, 0, 0.1);
}

/* 🖱️ 悬停状态适配 */
body.theme-light .circle-btn:hover {
  /* 悬停时背景加深 */
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================================
   🖐️ 拖拽排序样式
   ========================================= */

/* 正在被拖动的卡片 */
.sortable-drag {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05); /* 稍微放大，这就是“拿起来”的感觉 */
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  cursor: grabbing;
  z-index: 9999;
}

/* 占位符（原来的位置） */
.sortable-ghost {
  opacity: 0.2; /* 变淡，表示这里空了 */
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.3);
}

/* 为了防止手机上滚动时误触拖拽，建议给 .card 加这个 */
.card {
  /* 防止文字被选中，干扰拖拽体验 */
  user-select: none; 
  -webkit-user-select: none;
  /* 只有长按或明确拖拽时才触发，配合下面的 JS 设置 */
  touch-action: manipulation; 
}