/* ========== 文章详情页 — 亮色主题，与首页风格一致 ========== */

:root {
    --primary: #fe2c55;
    --primary-light: rgba(254,44,85,0.08);
    --text-main: #333;
    --text-sub: #888;
    --text-light: #aaa;
    --bg-page: #f7f7f7;
    --bg-card: #fff;
    --border: #eee;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
}

/* 全局图片 */
img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
img:hover { transform: scale(1.02); }

/* ========== 页面容器 ========== */
.article-container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ========== 主内容区 ========== */
.article-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: var(--shadow);
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb a:hover { color: #c8235e; }
.breadcrumb .sep { color: #ccc; }

/* 文章头部 */
.article-header {
    text-align: center;
    margin-bottom: 28px;
}
.article-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}
.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: var(--text-sub);
}
.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.article-meta .meta-item i { color: var(--text-light); }

/* 简介 */
.article-excerpt {
    margin: 0 0 24px;
    padding: 14px 18px;
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}
.article-excerpt strong {
    color: var(--primary);
    margin-right: 6px;
}

/* 文章正文 */
.news_infos {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}
.news_infos p { margin-bottom: 1.2em; }
.news_infos img {
    display: block;
    margin: 1.5em auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    max-width: 100%;
}
.news_infos img:hover { transform: scale(1.01); }
.news_infos h2,
.news_infos h3,
.news_infos h4 {
    color: var(--text-main);
    margin: 1.5em 0 0.8em;
    font-weight: 600;
}
.news_infos a { color: var(--primary); text-decoration: none; }
.news_infos a:hover { text-decoration: underline; }
.news_infos blockquote {
    margin: 1.5em 0;
    padding: 12px 18px;
    background: #f8f8f8;
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    color: #666;
    font-style: italic;
}
.news_infos code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #c7254e;
}
.news_infos pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}
.news_infos pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* 点赞/打赏 */
.thumbs_content {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px 0 0;
    border-top: 1px solid var(--border);
}
.thumbs_button,
.reward_button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 28px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    cursor: pointer;
    border: none;
}
.thumbs_button {
    background: linear-gradient(135deg, var(--primary), #e8235e);
    color: #fff;
}
.thumbs_button:hover {
    box-shadow: 0 4px 16px rgba(254,44,85,0.35);
    transform: translateY(-2px);
}
.reward_button {
    background: linear-gradient(135deg, #f6ba4f, #f59e0b);
    color: #fff;
}
.reward_button:hover {
    box-shadow: 0 4px 16px rgba(245,158,11,0.35);
    transform: translateY(-2px);
}
.thumbs_button .fa,
.reward_button .fa { font-size: 16px; }

/* 上一篇/下一篇 */
.nextinfo {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
}
.nextinfo p {
    font-size: 14px;
    color: var(--text-sub);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nextinfo p:first-child::before { content: '上一篇：'; color: var(--text-light); }
.nextinfo p:last-child::before { content: '下一篇：'; color: var(--text-light); }
.nextinfo a { color: #555; text-decoration: none; transition: color .2s; }
.nextinfo a:hover { color: var(--primary); }

/* 相关文章 */
.otherlink {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
}
.otherlink h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.otherlink h2 i { color: var(--primary); }
.otherlink ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.otherlink li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all .2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.otherlink li a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}
.otherlink li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* 评论 */
.news_pl {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow);
}
.news_pl h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.news_pl h2 i { color: var(--primary); }

/* ========== 侧边栏 ========== */
.article-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 10px;
}

.side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.side-card-header {
    padding: 14px 18px;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.side-card-header i { color: var(--primary); font-size: 13px; }

/* 推荐列表 */
.recommend-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}
.recommend-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 16px;
    border-bottom: 1px solid #f9f9f9;
    transition: background .2s;
}
.recommend-list li:last-child { border-bottom: none; }
.recommend-list li:hover { background: #fff5f6; }
.recommend-list .rank-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}
.recommend-list li:nth-child(1) .rank-badge { background: var(--primary); }
.recommend-list li:nth-child(2) .rank-badge { background: #ff6b81; }
.recommend-list li:nth-child(3) .rank-badge { background: #ffa502; }
.recommend-list li:nth-child(n+4) .rank-badge { background: #ccc; }
.recommend-list .rec-text { flex: 1; min-width: 0; }
.recommend-list .rec-title {
    display: block;
    font-size: 13px;
    color: #555;
    text-decoration: none;
/*    line-height: 1.4;*/
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
    transition: color .2s;
}
.recommend-list .rec-title:hover { color: var(--primary); }
.recommend-list .rec-meta {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 微信二维码 */
.side-card-body {
    padding: 16px;
    text-align: center;
}
.side-card-body img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    margin: 0 auto;
}

/* 工具入口卡片 */
.tool-entry {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tool-entry a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary), #e8235e);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
}
.tool-entry a:hover {
    box-shadow: 0 4px 14px rgba(254,44,85,0.3);
    transform: translateY(-1px);
}
.tool-entry a .fa { font-size: 16px; }

/* ========== 支付弹窗 ========== */
body .pay-class { border-radius: var(--radius); overflow: hidden; }
body .pay-class .layui-layer-title {
    background: var(--bg-card);
    color: var(--text-main);
    border: none;
    padding: 16px 20px;
    font-size: 15px;
}
body .pay-class .layui-layer-btn a {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 6px;
    transition: all .3s;
}
body .pay-class .layui-layer-btn a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .article-sidebar { display: none; }
}
@media (max-width: 768px) {
    .article-content { padding: 24px 20px; }
    .article-title { font-size: 20px; }
    .article-meta { gap: 12px; }
    .otherlink ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .article-container { padding: 12px 12px; margin: 12px auto; }
    .article-content { padding: 20px 16px; }
    .article-title { font-size: 18px; }
    .thumbs_content { flex-direction: column; align-items: center; }
    .thumbs_button, .reward_button { width: 100%; max-width: 240px; }
    .otherlink ul { grid-template-columns: 1fr; }
}
