:root {
    --primary: #1d9bf0; --primary-hover: #1a8cd8;
    --bg-body: #ffffff; --bg-hover: #eff3f4;
    --border: #eff3f4; --text-main: #0f1419; --text-dim: #536471;
    --backdrop: rgba(0, 0, 0, 0.4);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-body); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding-bottom: 60px; overflow-y: scroll; }
a { text-decoration: none; color: inherit; } button, input, textarea { font-family: inherit; outline: none; }

/* 布局 */
.layout { display: flex; justify-content: center; max-width: 1260px; margin: 0 auto; min-height: 100vh; align-items: flex-start; }
.left-sidebar { width: 275px; padding: 0 12px 20px 12px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; z-index: 10; }
.main-content { width: 600px; border-right: 1px solid var(--border); min-height: 100vh; position: relative; } /* 关键：相对定位 */
.right-sidebar { width: 350px; padding: 12px 0 10px 30px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }

/* 导航 */
.nav-logo { padding: 15px 12px; font-size: 30px; color: var(--primary); width: fit-content; border-radius: 50%; cursor: pointer; transition:.2s; }
.nav-logo:hover { background: var(--bg-hover); }
.nav-item { display: flex; align-items: center; padding: 12px 20px; margin: 4px 0; border-radius: 30px; font-size: 20px; color: var(--text-main); cursor: pointer; transition: .2s; width: fit-content; }
.nav-item:hover { background-color: var(--bg-hover); }
.nav-item.active { font-weight: 800; }
.nav-item i { margin-right: 20px; font-size: 26px; }
.nav-btn { background-color: var(--primary); color: #fff; width: 100%; padding: 15px 0; border-radius: 30px; border: none; font-size: 18px; font-weight: 700; cursor: pointer; transition: .2s; margin-top: 15px; box-shadow: 0 4px 10px rgba(29, 155, 240, 0.3); }
.nav-btn:hover { background-color: var(--primary-hover); }

/* --- 弹窗 (Modal) 样式 --- */
.modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--backdrop); z-index: 2000; 
    align-items: center; justify-content: center; backdrop-filter: blur(2px);
}
.modal-box { 
    background: #fff; width: 90%; max-width: 400px; border-radius: 16px; padding: 30px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); position: relative; animation: popIn 0.2s ease-out;
}
@keyframes popIn { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }
.close-btn { position: absolute; top: 15px; left: 15px; font-size: 20px; cursor: pointer; padding: 5px; }
.modal-title { font-size: 24px; font-weight: 900; margin-bottom: 20px; text-align: center; }
.modal-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }
.modal-switch span { color: var(--primary); cursor: pointer; font-weight: bold; }

/* 帖子 & 列表 */
.header { position: sticky; top: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); padding: 0 16px; height: 53px; display: flex; align-items: center; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 20px; z-index: 90; cursor: pointer; }
.post-item { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; cursor: pointer; transition: .2s; }
.post-item:hover { background-color: rgba(0,0,0,0.02); }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-right: 12px; flex-shrink: 0; background: #eee; }
.meta { color: var(--text-dim); font-size: 15px; margin-bottom: 2px; }
.title { font-weight: 700; font-size: 16px; margin-bottom: 4px; line-height: 1.3; }
.preview { color: var(--text-main); font-size: 15px; line-height: 1.5; word-wrap: break-word; }

/* --- 个人主页修复 --- */
.profile-banner { 
    width: 100%; height: 200px; background-color: #cfd9de; 
    /* 关键修复：确保图片不溢出 */
    display: block; position: relative;
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-header { padding: 0 16px; position: relative; margin-bottom: 16px; }
.profile-avatar-lg { 
    width: 134px; height: 134px; border-radius: 50%; border: 4px solid #fff; 
    margin-top: -67px; /* 向上偏移一半高度 */
    object-fit: cover; background: #fff; position: relative; z-index: 2; 
}
.profile-actions { position: absolute; top: 12px; right: 16px; }
.edit-btn { background: #fff; color: var(--text-main); border: 1px solid #cfd9de; padding: 8px 20px; border-radius: 9999px; font-weight: bold; cursor: pointer; transition: .2s; }
.edit-btn:hover { background: var(--bg-hover); }
.profile-name { font-weight: 900; font-size: 20px; margin-top: 5px; line-height: 1.2; }
.profile-uid { color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.profile-stats { display: flex; gap: 20px; color: var(--text-dim); font-size: 14px; }
.profile-stats b { color: var(--text-main); }

/* 通用组件 */
.form-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid var(--border); border-radius: 4px; font-size: 16px; outline: none; transition: .2s; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card { background: #f7f9f9; border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.card-title { font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; color: var(--text-dim); }
.qq-box { background: #fff; padding: 10px; border-radius: 8px; font-weight: bold; color: var(--primary); text-align: center; border: 1px dashed var(--primary); }

/* 移动端 */
.mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 53px; background: #fff; border-top: 1px solid var(--border); justify-content: space-around; align-items: center; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.m-item { flex: 1; height: 100%; display: flex; justify-content: center; align-items: center; font-size: 24px; color: var(--text-main); }
.m-item.active { color: var(--primary); }

@media (max-width: 1280px) { .left-sidebar { width: 88px; align-items: center; padding: 0 5px 20px 5px; } .nav-item span, .nav-btn span { display: none; } .nav-item { justify-content: center; padding: 12px; width: 50px; height: 50px; } .nav-item i { margin: 0; } .nav-btn { width: 50px; height: 50px; padding: 0; display: flex; justify-content: center; align-items: center; } .nav-btn::before { content: "+"; font-size: 30px; } .main-content { width: 600px; flex-shrink: 0; } .right-sidebar { width: 290px; } }
@media (max-width: 1000px) { .right-sidebar { display: none; } .main-content { width: 100%; border: none; margin: 0 auto; max-width: 600px; } }
@media (max-width: 500px) { .left-sidebar { display: none; } .mobile-bar { display: flex; } .main-content { padding-bottom: 70px; } .header i { display: none; } .post-item { padding: 10px 15px; } .avatar { width: 40px; height: 40px; margin-right: 10px; } }