* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航 */
.nav { background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.nav-content { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.nav-logo { font-size: 24px; font-weight: 700; color: #ff6b00; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: #333; text-decoration: none; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: #ff6b00; }
.nav-btn { background: #ff6b00; color: white; border: none; padding: 10px 24px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.nav-btn:hover { background: #ff5500; }

/* 顶部横幅 */
.banner { background: linear-gradient(135deg, #fff5e6 0%, #fff 100%); border-bottom: 1px solid #ffe4c4; padding: 40px 0; }
.banner-content { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.banner-text h1 { font-size: 32px; color: #ff6b00; margin-bottom: 8px; }
.banner-text p { font-size: 16px; color: #666; }
.banner-illustration { width: 300px; height: 180px; background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: white; font-size: 80px; }

/* 主内容区 */
.main-content { display: flex; gap: 30px; margin: 30px 0; }
.left-content { flex: 1; background: white; border-radius: 12px; padding: 30px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.right-sidebar { width: 320px; }

/* 文章卡片 */
.article-card { border-bottom: 1px dashed #eee; padding-bottom: 24px; margin-bottom: 24px; }
.article-card:last-child { border-bottom: none; margin-bottom: 0; }
.article-title { font-size: 22px; color: #1a1a1a; margin-bottom: 12px; line-height: 1.4; }
.article-title a { color: inherit; text-decoration: none; }
.article-title a:hover { color: #ff6b00; }
.article-desc { font-size: 14px; color: #666; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #999; }
.article-source { color: #ff6b00; font-weight: 500; }
.hot-tag { background: #ff3b3b; color: white; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

/* 右侧边栏 */
.sidebar-card { background: white; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.sidebar-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #ff6b00; display: inline-block; }

/* 作者卡片 */
.author-card { text-align: center; }
.author-avatar { width: 80px; height: 80px; background: linear-gradient(135deg, #ff6b00, #ff8c00); border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 32px; }
.author-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.author-desc { font-size: 13px; color: #666; margin-bottom: 16px; }
.author-stats { display: flex; justify-content: space-around; margin-bottom: 16px; }
.stat-item { text-align: center; }
.stat-num { font-size: 18px; font-weight: 600; color: #ff6b00; }
.stat-label { font-size: 11px; color: #999; }
.follow-btn { background: #4a90d9; color: white; border: none; padding: 10px 40px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.follow-btn:hover { background: #3a7fc8; }

/* 热搜榜单 */
.search-list { list-style: none; }
.search-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.search-item:last-child { border-bottom: none; }
.search-rank { width: 20px; height: 20px; background: #ff6b00; color: white; border-radius: 4px; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-right: 12px; font-weight: 600; }
.search-rank.top { background: #ff3b3b; }
.search-title { flex: 1; font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hot { font-size: 11px; color: #999; }

/* 底部 */
.footer { background: #1a1a1a; color: #999; padding: 40px 0; margin-top: 60px; text-align: center; }
.footer p { margin-bottom: 8px; }
.footer a { color: #ff6b00; text-decoration: none; }

/* ========== 发布页样式 ========== */
.header { background: white; padding: 20px 30px; border-radius: 12px 12px 0 0; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: space-between; }
.header h1 { font-size: 20px; color: #ff6b00; }
.header-right { display: flex; gap: 12px; }
.btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.btn-draft { background: #f5f5f5; color: #666; }
.btn-draft:hover { background: #e5e5e5; }
.btn-publish { background: #ff6b00; color: white; }
.btn-publish:hover { background: #ff5500; }
.editor-box { background: white; padding: 30px; border-radius: 0 0 12px 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 8px; color: #1f2937; }
.title-input { width: 100%; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 18px; font-weight: 500; transition: all 0.2s; }
.title-input:focus { outline: none; border-color: #ff6b00; box-shadow: 0 0 0 3px rgba(255,107,0,0.1); }
.source-input { width: 200px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 14px; }

/* 富文本工具栏 */
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-bottom: none; border-radius: 8px 8px 0 0; }
.toolbar-btn { width: 36px; height: 36px; border: 1px solid #e5e7eb; background: white; border-radius: 4px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.toolbar-btn:hover { background: #f3f4f6; border-color: #ff6b00; }
.toolbar-btn.active { background: #ff6b00; color: white; border-color: #ff6b00; }
.toolbar-sep { width: 1px; height: 36px; background: #e5e7eb; margin: 0 8px; }

/* 编辑器 */
.editor { width: 100%; min-height: 400px; padding: 20px; border: 1px solid #e5e7eb; border-radius: 0 0 8px 8px; font-size: 16px; line-height: 1.8; outline: none; overflow-y: auto; }
.editor:empty:before { content: attr(data-placeholder); color: #9ca3af; }
.editor:focus { border-color: #ff6b00; }
.editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.editor p { margin-bottom: 12px; }

/* 表情弹窗 */
.emoji-picker { position: relative; display: inline-block; }
.emoji-box { display: none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 12px; width: 320px; z-index: 1000; }
.emoji-box.show { display: block; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-item { width: 36px; height: 36px; border: none; background: transparent; border-radius: 4px; cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.emoji-item:hover { background: #f3f4f6; }

/* 图片上传提示 */
.upload-tip { background: #fffbeb; border: 1px dashed #ffc107; border-radius: 8px; padding: 16px; text-align: center; margin-top: 12px; color: #92400e; font-size: 13px; }

/* 草稿列表 */
.draft-list { margin-top: 30px; }
.draft-item { background: white; padding: 16px 20px; border-radius: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.draft-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.draft-title { font-weight: 500; color: #333; }
.draft-date { font-size: 12px; color: #999; margin-top: 4px; }
.draft-action { color: #ff6b00; font-size: 13px; }

/* 提示 */
.toast { position: fixed; top: 20px; right: 20px; background: #10b981; color: white; padding: 14px 24px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateX(120%); transition: transform 0.3s; z-index: 10000; }
.toast.show { transform: translateX(0); }
.toast.error { background: #ef4444; }

/* 响应式 */
@media (max-width: 768px) {
  .banner-content { flex-direction: column; text-align: center; }
  .banner-illustration { width: 100%; height: 120px; }
  .main-content { flex-direction: column; }
  .right-sidebar { width: 100%; }
  .nav-links { display: none; }
}
