:root {
    --quora-red: #b92b27;
    --quora-blue: #2e6930;
    --bg-color: #f1f2f2;
    --border-color: #e2e2e2;
    --text-main: #282829;
    --text-sub: #636466;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
    background: var(--bg-color); 
    color: var(--text-main); 
    line-height: 1.5; 
    font-size: 14px; 
}

/* 顶部 Header */
header { 
    background: #fff; 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}

.header-inner { 
    max-width: 1000px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 8px 15px; 
}

.logo { 
    color: var(--quora-red); 
    font-size: 22px; 
    font-weight: bold; 
    text-decoration: none; 
    font-family: Georgia, serif; 
}

.lang-switch a { 
    text-decoration: none; 
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 12px; 
    border: 1px solid var(--border-color); 
    color: #666; 
    margin-left: 5px; 
    transition: all 0.2s;
}

.lang-switch a.active { 
    background: var(--quora-red); 
    color: #fff; 
    border-color: var(--quora-red); 
}

/* 主体网格布局 */
.container { 
    max-width: 1000px; 
    margin: 15px auto; 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 20px; 
    padding: 0 15px; 
}

@media (max-width: 768px) { 
    .container { grid-template-columns: 1fr; } 
    .sidebar { display: none; } 
}

/* 顶部 Tag 滚动条 */
.tag-bar { 
    display: flex; 
    gap: 6px; 
    overflow-x: auto; 
    margin-bottom: 10px; 
    padding-bottom: 5px; 
    white-space: nowrap; 
}

.tag-item { 
    background: #eef0f2; 
    color: #636466; 
    padding: 3px 10px; 
    border-radius: 12px; 
    font-size: 12px; 
    text-decoration: none; 
}

/* 问题标题与文章卡片 */
.question-title { 
    font-size: 20px; 
    font-weight: 700; 
    color: #111; 
    margin-bottom: 12px; 
    line-height: 1.3; 
}

.card { 
    background: #fff; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    padding: 16px; 
    margin-bottom: 12px; 
}

.author-box { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 12px; 
}

.author-avatar { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
}

.author-name { 
    font-weight: bold; 
    color: #333; 
    font-size: 13px; 
}

.author-meta { 
    font-size: 12px; 
    color: var(--text-sub); 
}

/* 展开内容与图片区 */
.post-image-wrap { 
    position: relative; 
    margin: 10px 0; 
    max-height: 380px; 
    overflow: hidden; 
    border-radius: 4px; 
    transition: max-height 0.3s ease;
}

.post-image-wrap.expanded {
    max-height: none;
}

.post-image-wrap img { 
    width: 100%; 
    display: block; 
    object-fit: cover; 
}

.read-more-btn { 
    position: absolute; 
    bottom: 10px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: rgba(255,255,255,0.95); 
    border: 1px solid #ccc; 
    padding: 4px 15px; 
    border-radius: 15px; 
    font-size: 12px; 
    cursor: pointer; 
    font-weight: 500; 
}

.post-content {
    margin-top: 10px; 
    font-size: 14px; 
    line-height: 1.6;
}

/* 操作互动栏 */
.post-actions { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    border-top: 1px solid #f0f0f0; 
    padding-top: 10px; 
    margin-top: 10px; 
}

.action-btn { 
    background: #f7f7f8; 
    border: 1px solid var(--border-color); 
    padding: 4px 12px; 
    border-radius: 15px; 
    font-size: 12px; 
    color: #636466; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    transition: background 0.2s;
}

.action-btn:hover {
    background: #eef0f2;
}

.action-btn.active {
    background: #e6f0e6;
    color: var(--quora-blue);
    border-color: var(--quora-blue);
}

/* 侧边栏及推荐区 */
.sidebar-title { 
    font-weight: bold; 
    font-size: 13px; 
    color: #333; 
    margin-bottom: 10px; 
}

.rel-list { 
    list-style: none; 
}

.rel-item { 
    margin-bottom: 12px; 
}

.rel-item a { 
    text-decoration: none; 
    color: var(--quora-blue); 
    font-size: 13px; 
    font-weight: 500; 
    line-height: 1.4; 
    display: block; 
}

.rel-item a:hover { 
    text-decoration: underline; 
}

.rel-views { 
    font-size: 11px; 
    color: #888; 
    margin-top: 2px; 
}

.ad-box { 
    background: #fafafa; 
    border: 1px dashed #ccc; 
    padding: 15px; 
    text-align: center; 
    margin-top: 15px; 
    border-radius: 4px; 
}

.ad-btn { 
    background: #f97316; 
    color: #fff; 
    border: none; 
    padding: 6px 15px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 12px; 
    margin-top: 8px; 
    cursor: pointer; 
}

/* 底部推荐列表 */
.related-section { 
    margin-top: 15px; 
    background: #fff; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
}

.related-header { 
    padding: 12px 16px; 
    border-bottom: 1px solid #f0f0f0; 
    font-size: 13px; 
    font-weight: bold; 
    display: flex; 
    justify-content: space-between; 
    color: #666; 
}

.related-item-row { 
    padding: 10px 16px; 
    border-bottom: 1px solid #f0f0f0; 
}

.related-item-row.highlight { 
    background: #f4f6f8; 
}

.related-item-row a { 
    text-decoration: none; 
    color: var(--quora-blue); 
    font-size: 13px; 
    font-weight: 600; 
}

/* 页脚 */
footer { 
    background: #fff; 
    border-top: 1px solid var(--border-color); 
    margin-top: 40px; 
    padding: 20px 0; 
    text-align: center; 
    color: var(--text-sub); 
    font-size: 12px; 
}

footer a { 
    color: var(--text-sub); 
    text-decoration: none; 
    margin: 0 8px; 
}

footer a:hover { 
    text-decoration: underline; 
}

/* 问答内容截断与渐变遮罩 */
.post-content-container {
    position: relative;
    max-height: 220px; /* 默认折叠高度 */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.post-content-container.expanded {
    max-height: 5000px; /* 展开后足够高 */
}

/* 渐变遮罩层 */
.post-content-container:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95));
    pointer-events: none;
}

/* 展开按钮样式 */
.read-more-wrapper {
    text-align: center;
    margin-top: -20px;
    position: relative;
    z-index: 5;
}

.read-more-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.read-more-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}