/* 高仿知乎问答平台 - 大气清爽风格 */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
    background: #f6f6f6;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ===== 顶部导航 ===== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 52px;
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.topbar-inner {
    max-width: 1200px; margin: 0 auto; height: 100%;
    display: flex; align-items: center; padding: 0 20px;
}
.logo { margin-right: 30px; }
.logo a {
    font-size: 20px; font-weight: 700;
    color: #0084ff; text-decoration: none;
}
.nav { display: flex; gap: 4px; }
.nav a {
    padding: 8px 16px; font-size: 14px; color: #555;
    text-decoration: none; border-radius: 20px; transition: .2s;
}
.nav a:hover { background: #f0f2f5; color: #0084ff; }
.nav a.active { color: #0084ff; font-weight: 600; background: #e8f4ff; }
.topbar-right { margin-left: auto; }
.search-box {
    display: flex; align-items: center;
    background: #f0f2f5; border-radius: 20px; padding: 0 14px;
    height: 34px; width: 260px;
}
.search-box input {
    border: none; background: transparent; outline: none;
    font-size: 13px; color: #555; flex: 1;
}
.search-box button {
    background: none; border: none; cursor: pointer;
    font-size: 14px; color: #888; padding: 4px;
}

/* ===== 主布局 ===== */
.container {
    max-width: 1200px; margin: 0 auto; padding: 20px;
    margin-top: 52px;
}
.main-layout { display: flex; gap: 20px; align-items: flex-start; }
.feed { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ===== Feed流 ===== */
.feed-tabs {
    display: flex; gap: 4px; margin-bottom: 16px;
    background: #fff; border-radius: 8px; padding: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.tab {
    padding: 8px 20px; font-size: 14px; color: #555;
    cursor: pointer; border-radius: 6px; transition: .2s;
}
.tab:hover { background: #f0f2f5; color: #0084ff; }
.tab.active { background: #0084ff; color: #fff; font-weight: 500; }

/* ===== Feed卡片 ===== */
.feed-item {
    display: flex; gap: 14px; padding: 16px 20px;
    background: #fff; border-radius: 8px; margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .15s;
}
.feed-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.item-vote {
    display: flex; flex-direction: column; align-items: center;
    min-width: 44px; padding-top: 4px;
}
.vote-up {
    font-size: 18px; color: #999; cursor: pointer;
    transition: .2s; line-height: 1;
}
.vote-up:hover { color: #0084ff; }
.vote-num {
    font-size: 14px; font-weight: 600; color: #444;
    margin: 4px 0;
}
.item-main { flex: 1; min-width: 0; }
.item-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #999; margin-bottom: 6px;
}
.item-source { color: #175199; font-weight: 500; }
.item-time { color: #999; }
.item-title { margin-bottom: 6px; }
.item-title a {
    font-size: 16px; font-weight: 600; color: #1a1a1a;
    text-decoration: none; line-height: 1.4;
}
.item-title a:hover { color: #175199; }
.item-summary {
    font-size: 14px; color: #666;
    line-height: 1.6; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-actions {
    display: flex; gap: 20px; font-size: 13px; color: #888;
}
.action { cursor: pointer; transition: .2s; }
.action:hover { color: #0084ff; }

/* ===== 侧边栏 ===== */
.side-card {
    background: #fff; border-radius: 8px; padding: 20px;
    margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.side-card h3 {
    font-size: 15px; font-weight: 600; color: #1a1a1a;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.hot-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid #f6f6f6;
}
.hot-item:last-child { border-bottom: none; }
.hot-rank {
    width: 20px; font-size: 13px; font-weight: 600;
    color: #999; text-align: center; flex-shrink: 0;
}
.hot-item:nth-child(2) .hot-rank { color: #f1403c; }
.hot-item:nth-child(3) .hot-rank { color: #f59e0b; }
.hot-item a {
    font-size: 13px; color: #333; text-decoration: none;
    flex: 1; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-item a:hover { color: #175199; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tag {
    padding: 4px 14px; font-size: 13px; color: #555;
    background: #f0f2f5; border-radius: 20px; text-decoration: none;
    transition: .2s;
}
.cat-tag:hover { background: #e8f4ff; color: #0084ff; }
.friend-links { display: flex; flex-wrap: wrap; gap: 10px; }
.friend-links a {
    font-size: 13px; color: #888; text-decoration: none;
    border-bottom: 1px solid transparent;
}
.friend-links a:hover { color: #0084ff; border-bottom-color: #0084ff; }
.col-item {
    display: flex; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid #f6f6f6;
}
.col-item:last-child { border-bottom: none; }
.col-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg,#0084ff,#00a3ff);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0;
}
.col-info { flex: 1; min-width: 0; }
.col-name a {
    font-size: 13px; color: #1a1a1a; text-decoration: none; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}
.col-name a:hover { color: #175199; }
.col-desc {
    font-size: 12px; color: #999; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 详情页 ===== */
.detail-main { flex: 1; min-width: 0; }
.bread-crumb {
    font-size: 13px; color: #999; padding: 12px 0; margin-bottom: 4px;
}
.bread-crumb a { color: #175199; text-decoration: none; }
.bread-crumb a:hover { color: #0084ff; }
.bread-crumb span { color: #ccc; margin: 0 4px; }
.detail-header { padding-bottom: 16px; }
.detail-title {
    font-size: 24px; font-weight: 700; color: #1a1a1a;
    line-height: 1.3; margin-bottom: 10px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #999; }
.detail-content {
    background: #fff; border-radius: 8px; padding: 24px;
    font-size: 15px; line-height: 1.8; color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.detail-content p { margin-bottom: 16px; }
.detail-content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }
.detail-actions {
    display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap;
}
.action-btn {
    padding: 8px 20px; font-size: 14px; color: #555;
    background: #fff; border: 1px solid #ddd; border-radius: 20px;
    cursor: pointer; transition: .2s;
}
.action-btn:hover { border-color: #0084ff; color: #0084ff; }
.vote-btn { background: #0084ff; color: #fff; border-color: #0084ff; }
.vote-btn:hover { background: #0077e6; border-color: #0077e6; color: #fff; }

/* ===== 相关推荐 ===== */
.related-section, .comment-section {
    background: #fff; border-radius: 8px; padding: 24px;
    margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.related-section h3, .comment-section h3 {
    font-size: 16px; font-weight: 600; margin-bottom: 16px;
    padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
}
.related-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f6f6f6;
}
.related-item:last-child { border-bottom: none; }
.related-item a {
    flex: 1; font-size: 14px; color: #175199; text-decoration: none;
}
.related-item a:hover { color: #0084ff; }
.related-votes { font-size: 12px; color: #999; flex-shrink: 0; }

/* ===== 评论 ===== */
.comment-box { margin-bottom: 24px; }
.comment-box textarea {
    width: 100%; min-height: 80px; padding: 14px;
    border: 1px solid #ddd; border-radius: 8px; font-size: 14px;
    outline: none; resize: vertical; font-family: inherit;
    transition: .2s;
}
.comment-box textarea:focus { border-color: #0084ff; }
.submit-btn {
    margin-top: 8px; padding: 8px 24px;
    background: #0084ff; color: #fff; border: none;
    border-radius: 20px; font-size: 14px; cursor: pointer; transition: .2s;
}
.submit-btn:hover { background: #0077e6; }
.comment-item {
    padding: 14px 0; border-bottom: 1px solid #f0f0f0;
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.comment-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg,#0084ff,#00a3ff);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 11px; flex-shrink: 0;
}
.comment-author { font-size: 13px; color: #175199; font-weight: 500; }
.comment-time { font-size: 12px; color: #999; margin-left: auto; }
.comment-body { font-size: 14px; color: #333; line-height: 1.7; margin-bottom: 8px; }
.comment-actions { display: flex; gap: 16px; font-size: 13px; color: #888; }
.comment-actions span { cursor: pointer; transition: .2s; }
.comment-actions span:hover { color: #0084ff; }

/* ===== 列表页 ===== */
.list-header {
    display: flex; align-items: baseline; gap: 12px;
    padding: 12px 0 16px;
}
.list-header h1 { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.list-count { font-size: 13px; color: #999; }

/* ===== 分页 ===== */
.pagination-box { text-align: center; margin: 24px 0; }
.load-more {
    text-align: center; padding: 14px; font-size: 14px;
    color: #0084ff; cursor: pointer; border-radius: 8px;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: .2s; margin-top: 12px;
}
.load-more:hover { background: #e8f4ff; }

/* ===== 页脚 ===== */
.footer {
    background: #fff; border-top: 1px solid #ebebeb;
    margin-top: 40px; padding: 24px 0;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    text-align: center;
}
.footer-links { margin-bottom: 8px; }
.footer-links a {
    font-size: 13px; color: #8590a6; text-decoration: none; margin: 0 6px;
}
.footer-links a:hover { color: #0084ff; }
.footer-links span { color: #ddd; }
.footer p { font-size: 12px; color: #999; margin-top: 4px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .search-box { width: 180px; }
}
@media (max-width: 600px) {
    .topbar-inner { padding: 0 12px; }
    .nav a { padding: 6px 10px; font-size: 13px; }
    .search-box { width: 120px; }
    .container { padding: 12px; }
    .feed-item { padding: 12px 14px; }
    .detail-content { padding: 16px; }
}
