/*
 * Dark Panel Theme for Typecho
 * Fully matched with smgfxyjq.com main design language
 */

/* 1. 全局重置与基础配置 */
* {
  box-sizing: border-box;
}

body {
  background-color: #212121;
  color: #e4e4e7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  padding: 0;
}

a { 
  color: #00e676; 
  text-decoration: none; 
}

a:hover { 
  text-decoration: underline; 
}

/* 统一容器宽度与主页一致 */
.container { 
  width: 100%;
  max-width: 800px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

.row { 
  display: flex; 
  flex-direction: column; /* 强行单列卡片流，对齐主页 */
  width: 100%; 
}

/* 2. 顶栏 Topbar - 严格参照主页规则 */
#header.topbar {
    background-color: #1c1c1c;
    height: 52px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
}

/* 左侧标题 */
.site-name.topbar-title a#logo {
    color: #e4e4e7;
    font-size: 20px;
    font-weight: bold;
    font-family: inherit;
    text-decoration: none;
}

.site-name.topbar-title a#logo:hover {
    color: #00e676;
}

/* 右侧导航栏 */
.topbar-nav a {
    color: #e4e4e7;
    text-decoration: none;
    margin-left: 24px;
    font-size: 15px;
    transition: color 0.2s ease;
}

.topbar-nav a:hover,
.topbar-nav a.current {
    color: #00e676;
}

/* 3. 主体内容与卡片流 (Body & Post Cards) */
#body { 
  padding: 40px 0; 
}

#body > .container > .row { 
  gap: 24px;
}

#main { 
  width: 100%;
  flex: 1; 
  min-width: 0; 
}

/* 隐藏侧边栏，实现纯粹的单列极简展现 */
#secondary { 
  display: none; 
}

/* 核心卡片样式：完全复刻主页 .card */
.post {
  background-color: #383838;
  padding: 24px 28px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px !important;
}

/* 最后一个卡片去掉下边距 */
.post:last-child {
  margin-bottom: 0 !important;
}

.post-title { 
  margin: 0 0 12px 0; 
  font-size: 20px; 
  font-weight: bold;
}

.post-title a { 
  color: #ffffff; 
  text-decoration: none; 
}

.post-title a:hover { 
  color: #00e676; 
}

/* Meta 信息调优 */
.post-meta {
  list-style: none; 
  padding: 0; 
  margin: 0 0 16px 0;
  display: flex; 
  flex-wrap: wrap; 
  gap: 16px; 
  font-size: 13px; 
  color: #888888;
}

.post-meta a { 
  color: #888888; 
}

.post-meta a:hover { 
  color: #00e676; 
}

/* 文章内容与图片嵌入对齐 */
.post-content { 
  color: #e4e4e7; 
  line-height: 1.6; 
}

.post-content p {
  margin: 12px 0;
}

.post-content img { 
  display: block;
  margin: 12px auto;
  max-width: 100%; 
  height: auto; 
  border-radius: 6px; 
  background-color: #303030;
}

.post-content pre { 
  background: #1a1a1a; 
  padding: 16px; 
  border-radius: 6px; 
  overflow-x: auto; 
  border: 1px solid #444; 
}

.post-content code { 
  background: #1a1a1a; 
  padding: 2px 6px; 
  border-radius: 3px; 
  font-size: 0.9em; 
}

.post-content blockquote {
  border-left: 3px solid #00e676; 
  margin: 16px 0; 
  padding: 8px 16px;
  background: #2a2a2a; 
  border-radius: 0 6px 6px 0;
}

/* 归档标题样式 (如搜索/分类页) */
/* 归档/作者/分类筛选标题卡片重写 */
.archive-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 24px !important; /* 强制拉开与下方第一张文章卡片的间距 */
    padding: 16px 28px;
    background-color: #383838;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #00e676; /* 追加左侧绿色强调条，增强归档提示视觉 */
}

/* 4. 分页导航 (Pagination) */
.page-navigator { 
  display: flex; 
  justify-content: center; 
  gap: 8px; 
  margin: 32px 0 0 0; 
  list-style: none; 
  padding: 0; 
}

.page-navigator li { 
  display: inline; 
}

.page-navigator a, 
.page-navigator span {
  display: inline-block; 
  padding: 6px 14px; 
  background: #383838;
  color: #e4e4e7; 
  border-radius: 4px; 
  text-decoration: none; 
  font-size: 14px;
}

.page-navigator a:hover { 
  background: #00e676; 
  color: #212121; 
}

.page-navigator .current { 
  background: #00e676; 
  color: #212121; 
  font-weight: bold; 
}

/* 5. 页脚 (Footer) */
#footer { 
  text-align: center; 
  margin: 60px 0 20px 0; 
  font-size: 14px; 
  color: #888888; 
}

#footer a { 
  color: #888888; 
  text-decoration: none;
}

#footer a:hover { 
  color: #00e676; 
  text-decoration: underline;
}

/* ==========================================================================
   6. 文章详情页特化修复 (评论区与上下篇导航)
   ========================================================================== */

/* 6.1 评论区外框容器 */
#comments {
    background: #383838;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    margin-top: 24px;
}

#comments h3 {
    color: #ffffff;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #484848;
}

/* 6.2 评论列表样式 */
#comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

#comments .comment-list li {
    padding: 16px 0;
    border-bottom: 1px solid #444444;
}

#comments .comment-list li:last-child {
    border-bottom: none;
}

/* 评论头部：改为 Flex 容器，让头像与用户名垂直居中 */
#comments .comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

/* 头像微调 */
#comments .comment-avatar,
#comments .comment-author .avatar {
    margin-right: 10px;
    border-radius: 4px;
    display: block;
}

/* 用户名字号加大 + 向右远离头像 */
#comments cite {
    color: #00e676;
    font-style: normal;
    font-weight: bold;
    font-size: 16px;
    margin-left: 4px;
}

/* 评论时间：常驻白色，仅悬停/选中时显示强调色 */
#comments .comment-meta {
    font-size: 12px;
    color: #e4e4e7;
    margin-bottom: 8px;
}

#comments .comment-meta a {
    color: #e4e4e7;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* 被选中（Hover / Active）时显示品牌荧光绿 */
#comments .comment-meta:hover,
#comments .comment-meta a:hover,
#comments .comment-meta a:active {
    color: #00e676;
}

/* 评论内容与回复按钮 */
#comments .comment-content {
    color: #e4e4e7;
    line-height: 1.6;
    margin: 8px 0;
}

#comments .comment-reply a {
    color: #00e676;
    font-size: 13px;
    text-decoration: none;
}

#comments .comment-reply a:hover {
    text-decoration: underline;
}

/* 6.3 评论表单重置 (彻底消除纯白突兀感) */
.comment-respond {
    margin-top: 24px;
}

/* 使用 Grid/Flex 清理 label 与 input 的混乱布局 */
.comment-respond form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 表单输入组统一暗色外观 */
.comment-respond input[type='text'],
.comment-respond input[type='email'],
.comment-respond input[type='url'],
.comment-respond textarea {
    background-color: #2a2a2a !important;
    border: 1px solid #4a4a4a !important;
    color: #e4e4e7 !important;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    min-width: 0; /* 解除 cols 属性隐式最小宽度 */
    max-width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 文本域固定高度并允许垂直拉伸 */
.comment-respond textarea {
    min-height: 120px;
    resize: vertical;
}

/* 输入框聚焦高亮绿框 */
.comment-respond input:focus,
.comment-respond textarea:focus {
    border-color: #00e676 !important;
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.15);
}

/* 提交按钮：品牌荧光绿粗体风格 */
.comment-respond .submit {
    align-self: flex-start;
    background-color: #00e676 !important;
    color: #212121 !important;
    border: none !important;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.comment-respond .submit:hover {
    opacity: 0.9;
}

.comment-respond .submit:active {
    transform: scale(0.98);
}

/* 6.4 底部上下篇导航 (去黑点、卡片化内嵌) */
.post-near {
    list-style: none !important;
    padding: 0 !important;
    margin: 24px 0 0 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.post-near li {
    background: #2a2a2a;
    padding: 10px 16px;
    border-radius: 6px;
    color: #888888;
}

.post-near a {
    color: #00e676;
    text-decoration: none;
}

.post-near a:hover {
    text-decoration: underline;
}

/* 7. 移动端响应式 */
@media (max-width: 640px) {
  .topbar-nav a { 
    margin-left: 12px; 
    font-size: 14px;
  }
  .post {
    padding: 20px 18px;
  }
}
