body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
    background-color: #f6f6f6;
    margin: 0;
    padding: 0;
    color: #121212;
    font-size: 15px;
}

.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(18, 18, 18, .08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ebebeb;
}

.container {
    width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-links {
    display: flex;
    height: 100%;
    flex: 0 0 auto;
}

.nav-links a {
    color: #8590a6;
    text-decoration: none;
    margin-right: 32px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.nav-links a:hover {
    color: #175199;
}

.nav-links a.active {
    color: #121212;
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0084ff;
}

.logo {
    margin-right: 40px;
    display: flex;
    align-items: center;
}

.logo svg {
    height: 30px;
    fill: #0084ff;
}

.main-content {
    width: 1000px;
    margin: 16px auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.content-left {
    flex: 1;
}

.content-right {
    width: 296px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(18, 18, 18, .08);
    margin-bottom: 12px;
    padding: 0;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f2f7;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-list {
    padding: 10px 20px;
}

.sidebar-item {
    padding: 8px 0;
    font-size: 14px;
    color: #8590a6;
}

.question-item {
    padding: 20px;
    border-bottom: 1px solid #f0f2f7;
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    color: #121212;
    margin-bottom: 4px;
    display: block;
    text-decoration: none;
    line-height: 1.6;
}

.question-title:hover {
    color: #175199;
}

.question-excerpt {
    font-size: 15px;
    color: #606a76;
    line-height: 1.67;
    margin-bottom: 8px;
}

.meta {
    display: flex;
    align-items: center;
    margin-top: 10px;
    color: #8590a6;
    font-size: 14px;
}

.vote-btn {
    line-height: 30px;
    padding: 0 12px;
    border: 1px solid transparent;
    background: rgba(0, 132, 255, .1);
    color: #0084ff;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 16px;
    display: inline-flex;
    align-items: center;
}

.vote-btn:hover {
    background-color: rgba(0, 132, 255, .15);
}

.meta-action {
    margin-left: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #8590a6;
    text-decoration: none;
}

.meta-action:hover {
    color: #76839b;
}

/* Login Page Styles */
.login-page-bg {
    background-image: linear-gradient(135deg, #b8e5f8 0%, #e6f3ff 100%);
    background-repeat: no-repeat;
    background-color: #e6f3ff;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: #fff;
    width: 400px;
    padding: 0 24px 24px;
    box-shadow: 0 1px 3px rgba(18, 18, 18, .1);
    border-radius: 2px;
    box-sizing: border-box;
}

.login-header {
    text-align: center;
    padding-top: 40px;
    padding-bottom: 24px;
}

.login-logo {
    height: 81px;
    margin-bottom: 24px;
}

.login-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #ebebeb;
}

.login-tab {
    flex: 1;
    text-align: center;
    font-size: 16px;
    line-height: 40px;
    cursor: pointer;
    color: #121212;
    font-weight: 500;
}

.login-tab.active {
    border-bottom: 3px solid #0084ff;
    font-weight: 600;
}

.input-wrapper {
    margin-bottom: 12px;
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: none;
    border-bottom: 1px solid #ebebeb;
    box-sizing: border-box;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.input-wrapper input:focus {
    border-bottom-color: #0084ff;
}

.submit-btn {
    width: 100%;
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    line-height: 34px;
    color: #fff;
    background-color: #0084ff;
    border: 1px solid #0084ff;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 12px;
}

.submit-btn:hover {
    background-color: #0077e6;
    border-color: #0077e6;
}

.switch-type {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 14px;
    color: #8590a6;
}

.switch-type a {
    color: #175199;
    text-decoration: none;
    cursor: pointer;
}

.footer-links {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #8590a6;
}

/* Header Right Area */
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 将搜索栏和头像左右撑开 */
    gap: 24px; /* 保持最小间距 */
    min-width: 0;
}

.search-bar {
    position: relative;
    margin-right: 0;
    width: 100%;
    max-width: 326px;
    min-width: 220px;
}

.search-bar input {
    width: 100%;
    height: 34px;
    padding: 0 16px;
    border: 1px solid #ebebeb;
    border-radius: 999px;
    background: #f6f6f6;
    outline: none;
    font-size: 14px;
}
.search-bar input:focus {
    border-color: #0084ff;
    background: #fff;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.user-box {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 2px;
    background: #ebebeb;
    margin-left: 15px;
}

.logout-link {
    color: #8590a6;
    text-decoration: none;
    font-size: 14px;
    margin-left: 16px;
}

.link-login {
    color: #0084ff;
    text-decoration: none;
    font-size: 14px;
    margin-right: 0;
    flex: 0 0 auto;
}

.btn-primary {
    padding: 6px 16px;
    background: #0084ff;
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    flex: 0 0 auto;
}

/* Zhihu-style layout & components */
.zh-container { width: 1000px; margin: 16px auto; display: flex; align-items: flex-start; gap: 12px; }
.zh-main { flex: 1; }
.zh-sidebar { width: 296px; }
.zh-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(18,18,18,.08); margin-bottom: 12px; }
.zh-feed .zh-card-item { padding: 20px; border-bottom: 1px solid #f0f2f7; }
.zh-feed .zh-card-item--with-thumb { display:grid; grid-template-columns: 240px 1fr; gap:12px; align-items:flex-start; }
.zh-thumb { width: 100%; aspect-ratio: 3 / 2; background:#f6f6f6; border-radius:8px; overflow:hidden; }
.zh-thumb img { width:100%; height:100%; object-fit: cover; display:block; }
.zh-content { min-width:0; }
.zh-title { font-size: 18px; font-weight: 600; color: #121212; line-height: 1.6; text-decoration: none; }
.zh-title:hover { color: #175199; }
.zh-excerpt { font-size: 15px; color: #606a76; line-height: 1.67; margin-top: 4px; }
.zh-meta { display:flex; align-items:center; gap:16px; color:#8590a6; font-size:14px; margin-top:10px; }
.zh-actions { display:flex; align-items:center; gap:16px; margin-top:10px; }

/* Hot list */
.zh-hot-item { display:flex; align-items:flex-start; gap:12px; padding: 20px; border-bottom:1px solid #f0f2f7; }
.zh-hot-item:hover { background-color: #fafafa; }
.zh-hot-rank { width: 28px; flex: 0 0 28px; text-align:center; font-weight:700; color:#8590a6; }
.zh-hot-rank.is-top { color:#ff6a00; }
.zh-hot-title { font-size: 18px; font-weight: 600; color:#121212; text-decoration:none; }
.zh-hot-title:hover { color:#175199; }
.zh-hot-heat { font-size: 13px; color:#8590a6; margin-top:4px; }

@media (max-width: 768px) {
  .zh-hot-item { padding: 16px; }
  .zh-hot-title { font-size: 17px; }
}

.empty-tip {
    padding: 20px;
    color: #8590a6;
    font-size: 14px;
}

.footer-note {
    margin: 10px 0;
    color: #8590a6;
    font-size: 13px;
}
.right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto; /* 确保在 flex 容器中靠右 */
    flex-shrink: 0; /* 防止被压缩 */
}

/* Hot tabs */
.zh-tabs { display:flex; align-items:center; gap:16px; background:#fff; }
.zh-tab { display:inline-flex; align-items:center; height:40px; padding:0 4px; color:#8590a6; text-decoration:none; font-size:14px; position:relative; }
.zh-tab:hover { color:#175199; }
.zh-tab.active { color:#121212; font-weight:600; }
.zh-tab.active::after { content:''; position:absolute; bottom:-1px; left:0; right:0; height:3px; background:#0084ff; }

/* ContentItem & RichContent */
.ContentItem {
    padding: 20px;
    border-bottom: 1px solid #f0f2f7;
}

.ContentItem-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-top: -4px;
    margin-bottom: 4px;
}

.ContentItem-title a {
    color: #121212;
    text-decoration: none;
}

.ContentItem-title a:hover {
    color: #175199;
}

.RichContent {
    line-height: 1.67;
}

.RichContent.is-collapsed .RichContent-inner {
    /* 移除固定高度限制，避免文字显示不全 */
    max-height: none;
    overflow: visible;
}

.zh-excerpt {
    font-size: 15px;
    color: #444;
    line-height: 1.67;
    margin-top: 4px;
    margin-bottom: 8px;
    /* 增加多行文本截断 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.RichContent-cover {
    width: 190px;
    height: 105px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 18px;
    float: left;
    margin-bottom: 4px;
    background: #f6f6f6;
}

.RichContent-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.RichContent-inner {
    color: #121212;
    font-size: 15px;
}

.ContentItem-more {
    padding: 0;
    margin-left: 4px;
    color: #175199;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.ContentItem-more:hover {
    color: #646464;
}

.ContentItem-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0 0;
    margin: 0;
    flex-wrap: nowrap;
}

.ContentItem-actions .Button {
    display: inline-flex;
    align-items: center;
}

.ContentItem-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.Button {
    display: inline-block;
    padding: 0 16px;
    font-size: 14px;
    line-height: 32px;
    color: #8590a6;
    text-align: center;
    cursor: pointer;
    background: none;
    border: 1px solid;
    border-radius: 3px;
    outline: none;
    transition: all .3s;
}

.Button--plain {
    height: auto;
    padding: 0;
    line-height: inherit;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

.Button--withIcon {
    display: inline-flex;
    align-items: center;
}

.VoteButton {
    padding: 0 10px;
    color: #0084ff;
    background: rgba(0, 132, 255, .1);
    border-color: transparent;
    min-width: 88px;
    justify-content: center;
}

.VoteButton:hover {
    background-color: rgba(0, 132, 255, .15);
}

.VoteButton--down {
    margin-left: 4px;
}

.ContentItem-action {
    margin-left: 24px;
    color: #8590a6;
    font-size: 14px;
}

.ContentItem-action:hover {
    color: #76839b;
}

.ContentItem-arrowIcon {
    fill: currentColor;
}

.Zi {
    vertical-align: text-bottom;
    fill: currentColor;
}
.RichContent--withCover {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.RichContent--withCover .RichContent-cover {
    float: none;
    flex: 0 0 190px;
    width: 190px;
    height: 105px;
    margin: 0;
    border-radius: 4px;
}

.RichContent--withCover .RichContent-inner {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .RichContent--withCover {
        flex-direction: column;
    }
    .RichContent--withCover .RichContent-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }
}
