/* =============================================
   article.css — 文章详情页 & 资讯列表页样式
============================================= */

/* ---- 面包屑 ---- */
.art-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
    padding: 8px 0;
}
.art-breadcrumb .container {
    font-size: 0.82rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.art-breadcrumb a { color: #64748b; }
.art-breadcrumb a:hover { color: #ff6200; }
.art-breadcrumb .sep { color: #d1d5db; }

/* ---- 文章详情页布局 ---- */
.art-layout {
    display: flex;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 40px;
    align-items: flex-start;
}

/* ---- 主内容区 ---- */
.art-main {
    flex: 1;
    min-width: 0;
}

/* ---- 文章卡片 ---- */
.art-card {
    background: #fff;
    border-radius: 14px;
    border: 1.5px solid #e8e0d8;
    box-shadow: 0 2px 12px rgba(60,20,0,0.07);
    overflow: hidden;
    margin-bottom: 28px;
}
.art-header {
    background: linear-gradient(135deg, #ff6200 0%, #ff8c38 100%);
    padding: 28px 32px 22px;
    color: #fff;
}
.art-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 12px;
    color: #fff;
}
.art-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
}
.art-summary {
    padding: 14px 32px;
    background: #fffaf7;
    border-bottom: 1px solid #f0e8e0;
    font-size: 0.9rem;
    color: #52536a;
    line-height: 1.7;
    font-style: italic;
}
.art-body {
    padding: 28px 32px;
    font-size: 0.97rem;
    line-height: 1.85;
    color: #2d3748;
    word-break: break-word;
}
.art-body h2, .art-body h3 {
    color: #1e293b;
    margin: 20px 0 10px;
    font-weight: 700;
}
.art-body h2 { font-size: 1.2rem; }
.art-body h3 { font-size: 1.05rem; }
.art-body p { margin-bottom: 14px; }
.art-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.art-body a { color: #ff6200; text-decoration: underline; }
.art-body ul, .art-body ol { padding-left: 1.5em; margin-bottom: 14px; }
.art-body li { margin-bottom: 4px; }
.art-body blockquote {
    border-left: 4px solid #ff6200;
    background: #fff3ec;
    padding: 12px 20px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
    color: #6b3b1b;
    font-style: italic;
}
.art-body pre, .art-body code {
    background: #2b1a00;
    color: #fde8d0;
    border-radius: 6px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.88rem;
}
.art-body pre { padding: 16px; overflow-x: auto; margin: 16px 0; }
.art-body code { padding: 2px 6px; }
.art-body pre code { padding: 0; }

/* ---- 评论区 ---- */
.art-comments {
    background: #fff;
    border-radius: 14px;
    border: 1.5px solid #e8e0d8;
    box-shadow: 0 2px 12px rgba(60,20,0,0.07);
    overflow: hidden;
}
.comments-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    padding: 18px 28px;
    border-bottom: 1.5px solid #f0e8e0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comments-count {
    background: #ff6200;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 20px;
    min-width: 24px;
    text-align: center;
}
.comment-alert {
    margin: 16px 28px 0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}
.comment-ok  { background: #dcfce7; color: #16a34a; }
.comment-err { background: #fee2e2; color: #dc2626; }

/* ---- 发表评论表单 ---- */
.comment-form-wrap {
    padding: 24px 28px;
    border-bottom: 1.5px solid #f0e8e0;
    background: #fffaf7;
}
.comment-form-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}
.comment-form-tip {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 16px;
}
.comment-form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.comment-emoji-picker {
    flex: 0 0 200px;
}
.comment-input-wrap {
    flex: 1;
    min-width: 0;
}
.comment-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #52536a;
    margin-bottom: 6px;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    background: #fff;
    border: 1.5px solid #f0e8e0;
    border-radius: 10px;
    padding: 8px;
}
.emoji-item {
    font-size: 1.3rem;
    text-align: center;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s, transform 0.1s;
    line-height: 1;
}
.emoji-item:hover { background: #fff3ec; transform: scale(1.15); }
.emoji-item.active { background: #ffe0c8; box-shadow: 0 0 0 2px #ff6200; }
.selected-emoji-preview {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}
.selected-emoji-preview span { font-size: 1.4rem; vertical-align: middle; }
.comment-form-group { margin-bottom: 12px; }
.comment-form-group:last-child { margin-bottom: 0; }
.comment-input,
.comment-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e0d4c8;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}
.comment-input:focus,
.comment-textarea:focus {
    border-color: #ff6200;
    box-shadow: 0 0 0 3px rgba(255,98,0,0.12);
}
.comment-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.comment-char-count {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}
.comment-form-actions { margin-top: 14px; }
.comment-submit-btn {
    background: linear-gradient(135deg, #ff7a20, #ff5200);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 3px 10px rgba(255,98,0,0.30);
}
.comment-submit-btn:hover { background: linear-gradient(135deg, #ff5200, #cc3d00); transform: translateY(-1px); }
.comment-submit-btn:active { transform: translateY(0); }

/* ---- 评论列表 ---- */
.comments-empty {
    padding: 48px 28px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.88rem;
}
.comments-list {
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comment-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: #fffaf7;
    border-radius: 10px;
    border: 1px solid #f0e8e0;
    transition: background 0.12s;
}
.comment-item:hover { background: #fff3ec; }
.comment-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0e8e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
}
.comment-content-wrap { flex: 1; min-width: 0; }
.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-nickname {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
}
.comment-time {
    font-size: 0.75rem;
    color: #9ca3af;
}
.comment-text {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.7;
    word-break: break-word;
}

/* ---- 右侧边栏 ---- */
.art-sidebar {
    flex: 0 0 280px;
    min-width: 0;
    position: sticky;
    top: 70px;
}
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid #e8e0d8;
    box-shadow: 0 2px 10px rgba(60,20,0,0.07);
    overflow: hidden;
}
.sidebar-card-title {
    background: linear-gradient(135deg, #ff6200, #ff8c38);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 16px;
}
.sidebar-art-list { list-style: none; margin: 0; padding: 0; }
.sidebar-art-item { border-bottom: 1px solid #f5ede8; }
.sidebar-art-item:last-child { border-bottom: none; }
.sidebar-art-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}
.sidebar-art-item a:hover { background: #fff3ec; }
.sidebar-art-title {
    flex: 1;
    font-size: 0.82rem;
    color: #1e293b;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sidebar-art-date {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ---- 资讯列表页 ---- */
.news-hero {
    background: linear-gradient(135deg, #ff6200 0%, #ff8c38 100%);
    padding: 40px 0 32px;
    color: #fff;
}
.news-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.news-hero-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.80);
}
/* 资讯 hero 栏目快速入口 */
.news-hero-tabs {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.news-hero-tab {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.90);
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.30);
    transition: background 0.15s;
    text-decoration: none;
}
.news-hero-tab:hover {
    background: rgba(255,255,255,0.28);
    color: #fff;
    opacity: 1;
}
/* 广告代码容器（code 模式） */
.news-ad-code {
    padding: 10px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.news-layout {
    padding-top: 28px;
    padding-bottom: 48px;
    max-width: 860px;
}
.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.news-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid #e8e0d8;
    box-shadow: 0 2px 8px rgba(60,20,0,0.07);
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, transform 0.15s, border-color 0.15s;
    gap: 12px;
}
.news-card:hover {
    box-shadow: 0 8px 24px rgba(60,20,0,0.13);
    transform: translateY(-2px);
    border-color: #ff6200;
    color: inherit;
}
.news-card-body { flex: 1; min-width: 0; }
.news-card-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 6px;
}
.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}
.news-card:hover .news-card-title { color: #ff6200; }
.news-card-summary {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-card-arrow {
    font-size: 1.5rem;
    color: #d0c8c0;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
.news-card:hover .news-card-arrow { color: #ff6200; transform: translateX(4px); }

/* ---- 响应式 ---- */
@media (max-width: 860px) {
    .art-layout { flex-direction: column; }
    .art-sidebar { flex: none; width: 100%; position: static; }
    .comment-form-row { flex-direction: column; }
    .comment-emoji-picker { flex: none; width: 100%; }
    .emoji-grid { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 600px) {
    .art-header { padding: 20px 18px; }
    .art-title { font-size: 1.2rem; }
    .art-body { padding: 18px 16px; }
    .art-summary { padding: 12px 16px; }
    .comment-form-wrap { padding: 16px; }
    .comments-list { padding: 12px 14px; }
    .comments-title { padding: 14px 16px; }
    .comment-alert { margin: 12px 16px 0; }
    .comment-item { padding: 10px; gap: 10px; }
    .comment-avatar { width: 34px; height: 34px; font-size: 1.3rem; }
    .emoji-grid { grid-template-columns: repeat(8, 1fr); gap: 3px; }
    .news-hero { padding: 28px 0 22px; }
    .news-hero-title { font-size: 1.4rem; }
    .news-card { padding: 14px 16px; }
    .news-card-title { font-size: 0.95rem; }
}
