* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #6495ED 0%, #E6E6FA 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.search-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

#search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #667eea;
}

#clear-search {
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#clear-search:hover {
    background: #5a6268;
}

#search-result-info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

.date-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    overflow: hidden;
}

.date-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: 500;
}

.diaries-list {
    padding: 20px;
}

.diary-item {
    padding: 15px 0;
    border-bottom: 1px dashed #436EEE;
    transition: all 0.2s;
}

.diary-item:last-child {
    border-bottom: none;
}

.diary-item:hover {
    background: #E6E6FA;
    padding-left: 5px;
    padding-right: 5px;
    margin-left: -5px;
    margin-right: -5px;
    border-radius: 5px;
}

.diary-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.diary-item-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.diary-item-title:hover {
    color: #667eea;
}

.diary-item-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.diary-item-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.diary-item-author,
.diary-item-time,
.diary-item-word-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.diary-item.hidden {
    display: none;
}

.date-section.hidden-section {
    display: none;
}

.empty-state {
    background: white;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.empty-state h2 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination .disabled:hover {
    background: #f5f5f5;
    color: #ccc;
    transform: none;
}

.page-info {
    color: white;
    font-size: 14px;
}

.post {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.post-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.post-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.post-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    margin: 25px 0 15px 0;
    color: #444;
    border-left: 4px solid #667eea;
    padding-left: 10px;
}

.post-content p {
    margin-bottom: 15px;
}

/* 新增的代码高亮和图片样式 */
.post-content pre {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-content code {
    background: #f8f9fa;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
}

.post-content pre code {
    background: none;
    color: #f8f8f2;
    padding: 0;
    border: none;
    border-radius: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 25px 0;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.archive-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.archive-header {
    margin-bottom: 25px;
    text-align: center;
}

.archive-header h1 {
    color: #333;
    font-size: 24px;
}

.archive-item {
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.archive-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.archive-title:hover {
    color: #667eea;
}

.archive-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
}

.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
    padding: 20px;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .diary-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .main-nav {
        gap: 10px;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .post {
        padding: 20px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-content pre {
        padding: 15px;
        margin: 15px -10px;
        border-radius: 0;
    }
}
/* Hexo 内置高亮样式 */
figure.highlight {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

figure.highlight::before {
    content: '代码';
    position: absolute;
    top: 0;
    left: 0;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 0 0 8px 0;
}

figure.highlight table {
    width: 100%;
    border: none;
    margin: 0;
}

figure.highlight .gutter {
    width: 40px;
    padding-right: 15px;
    text-align: right;
    border-right: 1px solid #444;
}

figure.highlight .code {
    padding-left: 15px;
}

figure.highlight pre {
    background: none;
    margin: 0;
    padding: 0;
}

figure.highlight .line {
    height: 20px;
    line-height: 20px;
}

/* 行号样式 */
figure.highlight .gutter pre {
    color: #666;
}

/* 代码语法高亮颜色 */
figure.highlight .keyword { color: #ff79c6; font-weight: bold; }
figure.highlight .built_in { color: #50fa7b; }
figure.highlight .string { color: #f1fa8c; }
figure.highlight .number { color: #bd93f9; }
figure.highlight .comment { color: #6272a4; font-style: italic; }
figure.highlight .function { color: #50fa7b; }
figure.highlight .title { color: #f8f8f2; }
figure.highlight .params { color: #f8f8f2; }
figure.highlight .variable { color: #f8f8f2; }
figure.highlight .attr { color: #50fa7b; }
figure.highlight .tag { color: #ff79c6; }
figure.highlight .name { color: #50fa7b; }
figure.highlight .attribute { color: #f1fa8c; }
figure.highlight .value { color: #f1fa8c; }
/* ===== 代码高亮样式 ===== */

/* 代码块容器 */
figure.highlight {
    background: #1e1e1e !important;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* 代码块标题栏 */
figure.highlight::before {
    content: '代码';
    position: absolute;
    top: 0;
    left: 0;
    background: #667eea;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 0 0 8px 0;
    z-index: 1;
}

/* 表格布局 */
figure.highlight table {
    width: 100%;
    border: none;
    margin: 0;
    border-spacing: 0;
    background: transparent !important;
}

figure.highlight tr {
    background: transparent !important;
}

figure.highlight td {
    border: none;
    padding: 0;
    background: transparent !important;
}

/* 行号列 */
figure.highlight .gutter {
    width: 50px;
    padding-right: 15px;
    text-align: right;
    border-right: 1px solid #444;
    background: #2d2d2d !important;
    user-select: none;
}

figure.highlight .gutter pre {
    color: #888 !important;
    background: transparent !important;
    margin: 0;
    padding: 0 10px 0 0;
}

/* 代码列 */
figure.highlight .code {
    padding-left: 20px;
    background: #1e1e1e !important;
}

figure.highlight .code pre {
    background: transparent !important;
    margin: 0;
    padding: 0;
}

/* 代码行 */
figure.highlight .line {
    height: 22px;
    line-height: 22px;
    color: #d4d4d4 !important;
}

/* ===== 语法高亮颜色 ===== */

/* 关键字 */
figure.highlight .keyword { color: #569cd6 !important; font-weight: bold; }
figure.highlight .built_in { color: #4ec9b0 !important; }
figure.highlight .type { color: #4ec9b0 !important; }

/* 字符串 */
figure.highlight .string { color: #ce9178 !important; }
figure.highlight .subst { color: #ce9178 !important; }

/* 数字 */
figure.highlight .number { color: #b5cea8 !important; }
figure.highlight .literal { color: #b5cea8 !important; }

/* 注释 */
figure.highlight .comment { color: #6a9955 !important; font-style: italic; }

/* 函数 */
figure.highlight .function { color: #dcdcaa !important; }
figure.highlight .title { color: #dcdcaa !important; }

/* 变量和参数 */
figure.highlight .variable { color: #9cdcfe !important; }
figure.highlight .params { color: #9cdcfe !important; }

/* 属性 */
figure.highlight .attr { color: #9cdcfe !important; }

/* HTML/XML 标签 */
figure.highlight .tag { color: #569cd6 !important; }
figure.highlight .name { color: #569cd6 !important; }
figure.highlight .attribute { color: #9cdcfe !important; }
figure.highlight .value { color: #ce9178 !important; }

/* 标点符号 */
figure.highlight .punctuation { color: #d4d4d4 !important; }

/* 操作符 */
figure.highlight .operator { color: #d4d4d4 !important; }

/* 选择器 */
figure.highlight .selector { color: #d7ba7d !important; }

/* 重要声明 */
figure.highlight .important { color: #569cd6 !important; font-weight: bold; }

/* ===== 内联代码样式 ===== */
code {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #e83e8c;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid #dee2e6;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* 代码块中的内联代码 */
figure.highlight code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    figure.highlight {
        margin: 15px -10px;
        border-radius: 0;
        padding: 15px 10px;
    }
    
    figure.highlight .gutter {
        width: 40px;
    }
    
    figure.highlight .gutter pre {
        padding: 0 5px 0 0;
    }
    
    figure.highlight .code {
        padding-left: 10px;
    }
}