/* 引入中文字体：优先仿宋，后备宋体 */
@font-face {
    font-family: 'ComfortFangSong';
    src: local('FangSong'), local('STFangsong'), local('SimSun'), local('Songti SC');
    /* 稍微加粗一点以提高屏幕可读性 */
    font-weight: 500; 
}

/* 文章内容排版优化 */
.article-content {
    font-family: 'ComfortFangSong', serif;
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;    /* 宽松行高 */
    color: #1a202c;      /* 深灰，不全黑 */
}

.dark .article-content {
    color: #e2e8f0;      /* 深色模式下的字色 */
}

/* 稍微加粗效果 */
.article-content p {
    font-weight: 500;
    margin-bottom: 1.5em;
    text-align: justify; /*两端对齐*/
}

/* 标题样式恢复为无衬线字体，形成对比 */
.article-content h1, 
.article-content h2, 
.article-content h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
}

/* --- Markdown 图片样式 --- */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    display: block;
}

/* --- Markdown 表格样式 --- */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: 'Inter', sans-serif; /* 表格建议用无衬线更好读 */
    font-size: 0.95rem;
}
.article-content th {
    background-color: #f1f5f9;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid #cbd5e1;
}
.dark .article-content th {
    background-color: #1e293b;
    border-bottom: 2px solid #475569;
}
.article-content td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}
.dark .article-content td {
    border-bottom: 1px solid #334155;
}

/* --- 代码块工具栏容器 --- */
.code-block-wrapper {
    position: relative;
    margin: 1.5em 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #282c34; /* Match default dark theme */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Mac 风格的代码块头部 */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #21252b;
    border-bottom: 1px solid #181a1f;
}

.window-controls {
    display: flex;
    gap: 6px;
}
.control-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.copy-btn {
    color: #abb2bf;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    background: transparent;
    border: none;
}
.copy-btn:hover { color: #fff; }

/* 修正 pre 样式以适应 Wrapper */
.code-block-wrapper pre {
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 1rem !important;
    overflow-x: auto;
}

/* --- SSH 终端优化 --- */
#ssh-terminal {
    background-color: rgba(15, 23, 42, 0.95) !important; /* Slate-900 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.8) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#ssh-content::-webkit-scrollbar {
    width: 4px;
}
#ssh-content::-webkit-scrollbar-track {
    background: transparent;
}
#ssh-content::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 2px;
}
#ssh-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
