/* ============================================
   Pure Pro · 清爽蓝白色卡片主题
   公共样式 common.css【修复移动端导航BUG完整版】
   ============================================ */
:root {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-bg: rgba(59,130,246,0.08);
  --accent: #8b5cf6;
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}
body.dark-mode {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --primary-bg: rgba(59,130,246,0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a{    text-decoration: none;}
/* ===== 导航栏 ===== */
.navbar {
  position: sticky;
  top: 0; z-index: 999;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.3rem; font-weight: 800; color: var(--text);
  cursor: pointer; text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: white; box-shadow: 0 4px 12px rgba(59,130,246,0.3); flex-shrink: 0;
}
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
  padding: 0.5rem 1rem; border-radius: 10px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}
.nav-link:hover { background: var(--bg-secondary); color: var(--text); }
.nav-link.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-login-btn, .nav-register-btn {
  padding: 0.5rem 1rem; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.nav-login-btn { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.nav-login-btn:hover { border-color: var(--primary); color: var(--primary); }
.nav-register-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; box-shadow: 0 2px 10px rgba(59,130,246,0.3);
}
.nav-register-btn:hover { box-shadow: 0 4px 16px rgba(59,130,246,0.4); }
.nav-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; position: relative;
}
.nav-icon-btn:hover { background: var(--bg-secondary); color: var(--primary); }
.checkin-btn {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.45rem 0.9rem; border-radius: 10px;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(59,130,246,0.3);
}
.checkin-btn.checked { background: transparent; color: var(--success); border-color: var(--success); box-shadow: none; }
.menu-btn { display: none; }
.weather-btn { display: flex; align-items: center; gap: 0.25rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
/* ===== Section ===== */
.section { padding: 1.5rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.section-title-wrap { display: flex; align-items: center; gap: 0.75rem; }
.section-icon {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.section-title { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.section-subtitle { font-size: 0.82rem; color: var(--text-muted); }
.section-link { font-size: 0.85rem; color: var(--primary); cursor: pointer; display: flex; align-items: center; gap: 0.2rem; font-weight: 500; text-decoration: none; }
.section-link:hover { gap: 0.4rem; }
/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: all 0.3s;
}
.card:hover { box-shadow: var(--shadow-md); }
/* ===== 按钮 ===== */
.btn-primary {
  padding: 0.75rem 1.75rem; border-radius: 12px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; box-shadow: 0 4px 14px rgba(59,130,246,0.3); transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); }

/* ===== 弹窗登录注册 ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  z-index: 9999; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.field-row { display: flex; align-items: center; gap: 10px; }
.field-row .form-input { flex: 1; }
.live-avatar {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 3px 10px rgb(59 130 246 / 30%), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.live-avatar:hover { transform: scale(1.08); }
.live-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.live-avatar svg { width: 30px; height: 30px; display: block; }
.live-avatar .av-fb { display: none; }
.live-avatar.popping svg { animation: avatarPop .3s cubic-bezier(.34,1.56,.64,1); }

@keyframes popIn{from{transform:scale(.94);opacity:0;}to{transform:scale(1);opacity:1;}}
.modal-overlay.show { display: flex !important; }
.modal-box {
  background: var(--bg-card); border-radius: 16px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 400px;
  max-height: 85vh; overflow-y: auto; border: 1px solid var(--border);
}
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: var(--bg-secondary); color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 1.5rem; }
/* 表单 */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-input {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font-size: 0.95rem; font-family: inherit; outline: none; transition: all 0.2s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-input::placeholder { color: var(--text-muted); }
.submit-btn {
  width: 100%; padding: 0.85rem; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.submit-btn:hover { transform: translateY(-1px); }
.password-wrap {
  position: relative;
}
/* 给右边按钮留出空间，避免输入文字被挡住 */
.password-wrap .form-input {
  padding-right: 48px;
}
.toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}
.toggle-pwd:hover {
  color: var(--primary);
  background: var(--primary-bg);
}
/* 显示密码时，给眼睛加斜杠 */
.toggle-pwd.eye-off::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  left: 0;
  top: 50%;
}

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; padding: 0.75rem 1.5rem; border-radius: 12px;
  font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
  z-index: 99999; transition: transform 0.3s;
}
.toast.show { transform: translateX(-50%) translateY(0); }
/* ===== 签到日历 ===== */
.checkin-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); border: 1px solid var(--border);
}
.checkin-day.checked { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-color: transparent; font-weight: 700; }
.checkin-day.today { border: 2px solid var(--primary); font-weight: 700; color: var(--primary); }
/* ===== 页脚 ===== */
footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem; margin-top: 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-top: 0.75rem; }
.footer-col-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.footer-link { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; cursor: pointer; transition: color 0.2s; text-decoration: none; }
.footer-link:hover { color: var(--primary); }
.copyright { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-muted); }

/* ========== 导航下拉子菜单 修复版 ========== */
.nav-item {
  position: relative;
  display: inline-block;
}
.nav-item.has-sub > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-item.has-sub > .nav-link::after {
  content: "▼";
  font-size: 10px;
  opacity: 0.7;
}

.submenu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 1000;
  display: none;
}
.submenu.show{
    display:block;
}

.submenu .nav-link {
  display: block;
  width: 100%;
  border-radius: 10px;
  padding: 8px 16px;
}

/*用户下拉菜单*/
/* ===== 用户菜单样式 ===== */
.nav-user-wrap {
    position: relative;
    display: inline-block;
    margin-left: 4px;
}
.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
}
.nav-avatar:hover {
    transform: scale(1.05);
}
.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow: hidden;
}
.user-dropdown.show {
    display: block;
}
.dropdown-user-info {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.dropdown-username {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.dropdown-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}
.dropdown-item {
    padding: 11px 16px;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background: #f1f5f9;
    color: #6366f1;
}
.logout-item {
    color: #ef4444;
}
.logout-item:hover {
    background: #fef2f2;
    color: #ef4444;
}


/* PC端悬浮展开 */
@media (min-width:769px){
    .nav-item.has-sub:hover > .submenu {
      display: block;
    }
    /* 三级菜单向右弹出 */
    .submenu .nav-item {
      position: relative;
    }
    .submenu .nav-item > .submenu {
      top: 0;
      left: 100%;
      margin-left: 4px;
    }
}

/* ===== Hero ===== */
.hero { padding: 2.5rem 0 1.5rem; }
.hero-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 24px;
  padding: 2.5rem;
  border: 1px solid #dbeafe;
  position: relative;
  overflow: hidden;
}
body.dark-mode .hero-card { background: linear-gradient(135deg, #1e293b 0%, #1e3a5f 100%); border-color: #334155; }
.hero-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: white;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.25; margin-bottom: 0.8rem; color: var(--text); }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.5rem; max-width: 500px; }
.hero-btns { display: flex; gap: 0.75rem; }
.hero-btn {
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.hero-btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 4px 14px rgba(59,130,246,0.3); }
.hero-btn.ghost { background: white; color: var(--text-secondary); border: 1px solid var(--border); }
/* ===== 在线用户 ===== */
.online-users { display: flex; gap: 1rem; overflow-x: auto; padding: 0.5rem 0; }
.online-user { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; cursor: pointer; min-width: 64px; padding: 0.5rem; border-radius: 12px; transition: all 0.2s; }
.online-user:hover { background: var(--bg-secondary); }
.online-avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.online-dot { position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; background: var(--success); border: 2px solid var(--bg-card); border-radius: 50%; }
.online-dot.off { background: #d1d5db; }

.online-users { min-height: 76px; align-items: center; }

.startchat-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:999;}
.startchat-panel{width:min(92vw,360px);background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.25);}
.startchat-head{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;font-weight:700;border-bottom:1px solid #f1f3f5;}
.startchat-close{width:26px;height:26px;border-radius:50%;background:#f1f3f5;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1rem;color:#6b7280;}
.startchat-list{max-height:50vh;overflow-y:auto;padding:.6rem;}
.startchat-item{display:flex;align-items:center;gap:.8rem;padding:.7rem .8rem;border-radius:12px;cursor:pointer;transition:background .15s;}
.startchat-item:hover{background:#f8fafc;}
.startchat-ava{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;}
.startchat-ava img{width:100%;height:100%;}
.startchat-item span{font-size:.9rem;color:#1f2937;}

/* ===== 精选推荐 ===== */
.featured-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; }
.featured-main { border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.3s; }
.featured-main:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.featured-main .cover { height: 240px; position: relative; }
.cover-tag { position: absolute; top: 1rem; left: 1rem; padding: 0.3rem 0.7rem; border-radius: 6px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; font-size: 0.75rem; font-weight: 600; z-index: 2; }
.featured-main .info { padding: 1.25rem; }
.featured-main .title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.featured-main .meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.featured-side { display: flex; flex-direction: column; gap: 1rem; }
.featured-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.3s; display: flex; flex: 1; }
.featured-item .cover { width: 110px; min-height: 100px; flex-shrink: 0; }
.featured-item .info { padding: 0.9rem; flex: 1; }
.featured-item .cat { font-size: 0.7rem; font-weight: 600; color: var(--primary); margin-bottom: 0.3rem; }
.featured-item .title { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.3rem; line-height: 1.4; }
.featured-item .meta { font-size: 0.72rem; color: var(--text-muted); }
/* ===== 文章卡片 ===== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.article-card { border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.3s; }
.article-card .cover { height: 150px; position: relative; }
.article-card .cover-tag { position: absolute; top: 0.7rem; left: 0.7rem; padding: 0.2rem 0.55rem; border-radius: 5px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; font-size: 0.7rem; font-weight: 600; }
.article-card .body { padding: 1.1rem; }
.article-card .title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; line-height: 1.4; }
.article-card .desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .footer { display: flex; justify-content: space-between; align-items: center; }
.article-card .author { display: flex; align-items: center; gap: 0.5rem; }
.article-card .author-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.75rem; font-weight: 700; }
.article-card .author-name { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; }
.article-card .stats { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }
/* ===== 发布框 ===== */
.publish-box { background: var(--bg-card); border-radius: var(--radius); padding: 1.1rem; border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 1rem; transition: all 0.25s; }
.publish-row { display: flex; gap: 0.75rem; align-items: flex-start; }
.publish-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; flex-shrink: 0; }
.publish-input-wrap { flex: 1; }
.publish-input { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font-size: 0.92rem; font-family: inherit; resize: none; min-height: 44px; outline: none; transition: all 0.2s; line-height: 1.5; }
.publish-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); background: var(--bg-card); }
.publish-input::placeholder { color: var(--text-muted); }
.publish-toolbar { display: flex; justify-content: space-between; align-items: center; margin-top: 0; max-height: 0; opacity: 0; overflow: hidden; transition: all 0.3s ease; }
.publish-box.expanded .publish-toolbar { max-height: 60px; opacity: 1; margin-top: 0.6rem; }
.publish-icons { display: flex; gap: 0.3rem; }
.publish-icon-btn { width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.publish-icon-btn:hover { background: var(--bg-secondary); color: var(--primary); }
.publish-send-btn { padding: 0.5rem 1.25rem; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; font-size: 0.85rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(59,130,246,0.3); }
/* ===== 社区动态 ===== */
.feed-list { display: flex; flex-direction: column; gap: 1rem; }
.feed-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--border); box-shadow: var(--shadow); transition: all 0.3s; }
.feed-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.8rem; }
.feed-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; flex-shrink: 0; }
.feed-user-info { flex: 1; }
.feed-username { font-size: 0.95rem; font-weight: 700; }
.feed-time { font-size: 0.75rem; color: var(--text-muted); }
.feed-content { font-size: 0.92rem; line-height: 1.6; margin-bottom: 0.8rem; }
.feed-likes { margin-top: 0.6rem; padding: 0.5rem 0.75rem; background: var(--bg-secondary); border-radius: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.feed-likes strong { color: var(--primary); font-weight: 600; }
.feed-stats { display: flex; gap: 1.5rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.feed-stat { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; transition: color 0.2s; }
.feed-stat:hover { color: var(--primary); }
.feed-stat.liked { color: #ef4444; }
.feed-comments { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.feed-comment-input{display:flex;gap:0.5rem;margin-top:0.6rem;align-items:center;}
.feed-comment-input input{flex:1;}

.comment-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.comment-body{flex:1;min-width:0;}
.comment-user{display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;}
.comment-nick{font-size:0.82rem;font-weight:600;color:var(--primary);}
.comment-time{font-size:0.7rem;color:#9ca3af;}
.comment-act{font-size:0.72rem;color:var(--text-muted);cursor:pointer;}
.comment-act:hover{color:var(--primary);}
.comment-text{font-size:0.85rem;color:var(--text-secondary);line-height:1.5;margin-top:0.1rem;word-break:break-word;}




.img-tabs{display:flex;gap:1.2rem;padding:0.8rem 1.2rem 0;border-bottom:1px solid #f1f3f5;}
.img-tab{font-size:0.88rem;font-weight:600;color:#6b7280;padding:0.5rem 0.1rem;border-bottom:2px solid transparent;cursor:pointer;}
.img-tab.active{color:#2563eb;border-color:#2563eb;}
.img-pick-btn{width:100%;padding:0.7rem;border:1.5px dashed #d1d5db;border-radius:10px;background:#f8fafc;color:#374151;font-size:0.88rem;font-weight:600;cursor:pointer;}
.img-pick-btn:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff;}
.img-insert-btn{width:100%;margin-top:1rem;padding:0.65rem 0;border:none;border-radius:10px;background:#2563eb;color:#fff;font-size:0.92rem;font-weight:600;cursor:pointer;}
.img-insert-btn:hover{opacity:.92;}
.publish-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; margin-top: 0; max-height: 0; opacity: 0; overflow: hidden; transition: all 0.3s ease; }
.publish-box.expanded .publish-toolbar { max-height: 200px; opacity: 1; margin-top: 0.6rem; }
.publish-icons { display: flex; gap: 0.3rem; flex-shrink: 0; flex-wrap: wrap; }
.publish-send-btn { padding: 0.5rem 1.25rem; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; font-size: 0.85rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(59,130,246,0.3); flex-shrink: 0; }
/*九宫格*/
.feed-imgs{display:grid;gap:4px;margin-top:0.6rem;border-radius:12px;overflow:hidden;}
.feed-img-item{background:var(--bg-secondary);min-width:0;min-height:0;}
.feed-img-item img{width:100%;height:100%;object-fit:cover;display:block;}
/* 1张 大图横条 */
.feed-img-1{grid-template-columns:1fr;}
.feed-img-1 .feed-img-item{aspect-ratio:16/9;}
/* 2张 左大右小 */
.feed-img-2{grid-template-columns:2fr 1fr;}
.feed-img-2 .feed-img-item{aspect-ratio:1/1;}
/* 3张 左大 + 右两小 */
.feed-img-3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr;}
.feed-img-3 .feed-img-item:first-child{grid-row:span 2;}
.feed-img-3 .feed-img-item{aspect-ratio:1/1;}
/* 4张 2x2 */
.feed-img-4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;}
.feed-img-4 .feed-img-item{aspect-ratio:1/1;}
/* 5张 左大 + 右 2x2 */
.feed-img-5{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr;}
.feed-img-5 .feed-img-item:first-child{grid-row:span 2;}
.feed-img-5 .feed-img-item{aspect-ratio:1/1;}
/* 6张 左大 + 右5（2列3行） */
.feed-img-6{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr;}
.feed-img-6 .feed-img-item:first-child{grid-row:span 3;}
.feed-img-6 .feed-img-item{aspect-ratio:1/1;}
/* 7张 左大 + 右6（2列3行） */
.feed-img-7{grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr;}
.feed-img-7 .feed-img-item:first-child{grid-row:span 3;}
.feed-img-7 .feed-img-item{aspect-ratio:1/1;}
/* 8张 4列x2行 */
.feed-img-8{grid-template-columns:repeat(4,1fr);grid-template-rows:1fr 1fr;}
.feed-img-8 .feed-img-item{aspect-ratio:1/1;}
/* 9张 3x3 */
.feed-img-9{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);}
.feed-img-9 .feed-img-item{aspect-ratio:1/1;}


.feed-comment{display:flex;gap:0.6rem;padding:0.45rem 0;border-bottom:1px solid #f5f6f8;}
.feed-comment:last-child{border-bottom:none;}
.comment-avatar{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:0.75rem;font-weight:700;flex-shrink:0;}
.comment-body{flex:1;min-width:0;background:var(--bg-secondary);padding:0.55rem 0.75rem;border-radius:10px;border-top-left-radius:4px;}

.comment-user{display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;}
.comment-nick{font-size:0.82rem;font-weight:600;color:var(--primary);}
.comment-time{font-size:0.7rem;color:#9ca3af;}
.comment-act{font-size:0.72rem;color:var(--text-muted);cursor:pointer;}
.comment-act:hover{color:var(--primary);}
.comment-text{font-size:0.85rem;color:var(--text-secondary);line-height:1.5;margin-top:0.1rem;word-break:break-word;}
.feed-replies{margin:0.3rem 0 0 2.2rem;border-left:2px solid var(--border);padding-left:0.8rem;display:flex;flex-direction:column;gap:0.35rem;}
.feed-reply{display:flex;gap:0.5rem;}
.reply-avatar{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:0.7rem;font-weight:700;flex-shrink:0;}
.reply-body{flex:1;min-width:0;}
.reply-to{font-size:0.72rem;color:#9ca3af;}
.expand-replies{font-size:0.75rem;color:var(--primary);cursor:pointer;padding:0.25rem 0 0.15rem 0;}
.reply-input{display:flex;gap:0.5rem;margin-top:0.4rem;align-items:center;}
.reply-input input{flex:1;padding:0.45rem 0.7rem;border:1px solid var(--border);border-radius:10px;font-size:0.82rem;outline:none;background:var(--bg);color:var(--text);}
.author-badge{display:inline-block;padding:0.05rem 0.35rem;background:#7861f3;color:#fff;font-size:0.65rem;font-weight:600;border-radius:4px;margin-left:0.3rem;vertical-align:middle;}

/* PC 端：左内容右评论 */
@media (min-width: 768px) {
  .feed-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
  .feed-side { border-left: 1px solid var(--border); padding-left: 1.25rem; }
  .feed-side .feed-comments { margin-top: 0; }
  .feed-side .feed-comment-input { margin-top: 0.6rem; }
}
@media (max-width: 767.98px) {
  .feed-card { display: block; }
}

/* ===== 创作者榜单 ===== */
.creator-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.creator-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: center; gap: 1rem; transition: all 0.3s; }
.creator-rank { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0; }
.creator-rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.creator-rank.silver { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; }
.creator-rank.bronze { background: linear-gradient(135deg, #d97706, #92400e); color: white; }
.creator-rank.normal { background: var(--bg-secondary); color: var(--text-muted); }
.creator-avatar { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.creator-info { flex: 1; min-width: 0; }
.creator-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.creator-badge { padding: 0.1rem 0.5rem; background: var(--primary-bg); color: var(--primary); font-size: 0.7rem; border-radius: 4px; margin-left: 0.4rem; font-weight: 600; }
.creator-meta { font-size: 0.78rem; color: var(--text-muted); }
.creator-follow { padding: 0.5rem 1rem; border-radius: 8px; border: 1.5px solid var(--primary); background: transparent; color: var(--primary); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.creator-follow:hover { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-color: transparent; }
.creator-follow.followed { background: var(--bg-secondary); color: var(--text-muted); border-color: var(--border); }
/* ===== 友情链接 ===== */
.links-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.links-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.links-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 700; }
.apply-link-btn { padding: 0.5rem 1rem; border-radius: 8px; border: 1.5px dashed var(--primary); background: transparent; color: var(--primary); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.apply-link-btn:hover { background: var(--primary-bg); }
.friend-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 768px) {
  .featured-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .creator-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .hero-card { padding: 1.5rem; }
}
/* 移动端媒体查询 */
@media (max-width: 768px) {
  .nav-links {
    display: none !important; /* 加!important，强制隐藏 */
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: row !important;
        align-items: center !important;
        padding: 0.6rem 1rem;
        gap: 0.2rem;
        border-bottom: 1px solid var(--border);
        display: none;
        box-shadow: var(--shadow-lg);
        overflow-x: auto;
  }
  .nav-links.show { display: flex !important; }
  .menu-btn { display: flex !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-login-btn, .nav-register-btn { display: none; }
  .checkin-btn span, .weather-btn span { display: none; }

  /* 移动端子菜单向下展开，禁用hover弹出 */
  .nav-item.has-sub .submenu{
      position: static;
      box-shadow: none;
      border: none;
      padding-left:12px;
      background:transparent;
      min-width:auto;
  }
  .nav-item.has-sub:hover > .submenu {
      display:none;
  }
}


