/*
Theme Name: 林海草原
Description: 简洁明了的单栏区块主题，护眼浅蓝色背景
Version: 1.1
Text Domain: linhai-caoyuan
*/

/* 全局样式 */
:root {
    --bg-color: #f0f8ff;
    --text-color: #333333;
    --link-color: #0073aa; 
    --link-hover: #005a87; 
    --main-font-size: 18px;
    --secondary-font-size: 16px;
    --small-font-size: 14px;
    --line-height: 1.8;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: var(--main-font-size);
    line-height: var(--line-height);
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 20px;
}

/* 内容容器 */
.wp-site-blocks {
    max-width: 800px;
    margin: 0 auto;
}

/* 文章列表样式 */
.wp-block-query .wp-block-group {
    line-height: var(--line-height);
}

.wp-block-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: var(--line-height);
}

.wp-block-post-title a:hover {
    color: var(--link-color);
}

.wp-block-post-date {
    font-size: var(--small-font-size);
    color: #666;
    text-align: right;
    margin-top: 8px;
    line-height: var(--line-height);
}

/* 文章标题和日期同行布局 */
.wp-block-query .wp-block-group[class*="flex"] {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.wp-block-query .wp-block-group .wp-block-post-title {
    flex: 1;
    margin-bottom: 0 !important;
    text-align: left;
}

.wp-block-query .wp-block-group .wp-block-post-date {
    flex-shrink: 0;
    text-align: right;
    margin-top: 0 !important;
    white-space: nowrap;
    margin-left: auto;
}

/* 确保标题不会换行 */
.wp-block-post-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 评论样式 */
.wp-block-comments {
    margin-top: 40px;
    line-height: var(--line-height);
}

.wp-block-comments * {
    line-height: var(--line-height);
}

/* 页头页脚样式 */
.wp-block-template-part header *,
.wp-block-template-part footer * {
    line-height: var(--line-height);
}

/* 段落和标题通用行高 */
p, h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height);
}

/* 导航菜单样式 */
.wp-block-navigation .wp-block-navigation-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
    color: var(--link-color);
}

/* 网站标题样式 */
.wp-block-site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.wp-block-site-title a:hover {
    color: var(--link-color);
}

/* 分页样式 */
.wp-block-query-pagination a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-block-query-pagination a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.wp-block-query-pagination .page-numbers.current {
    color: var(--text-color);
    font-weight: bold;
}

/* 确保所有链接样式一致 */
a {
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

/* 选择文本样式 */
::selection {
    background: var(--link-color);
    color: white;
}

::-moz-selection {
    background: var(--link-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 16px;
        line-height: 1.7;
    }
    
    .wp-block-query .wp-block-group[class*="flex"] {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .wp-block-query .wp-block-group .wp-block-post-date {
        text-align: right;
        align-self: center;
    }
    
    .wp-block-post-title a {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

@media (max-width: 480px) {
    .wp-block-post-title {
        font-size: 20px !important;
    }
    
    body {
        line-height: 1.7;
    }
    
    .wp-block-query .wp-block-group[class*="flex"] {
        gap: 10px;
    }
    
    .wp-block-query .wp-block-group .wp-block-post-date {
        font-size: 13px;
    }
}