/*
    Theme Name: 简单入门主题
    Theme URI: https://example.com/
    Description: 一个简单的WordPress主题，适合初学者学习
    Author: 你的名字
    Author URI: https://example.com/
    Version: 1.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Text Domain: simple-starter-theme
    */

/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 0;
    margin: 0;
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.site-title {
    margin: 0;
    font-size: 2rem;
}

.site-description {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    font-style: italic;
}

/* 导航菜单样式 */
.main-navigation {
    margin-top: 1rem;
}

.main-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-menu li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.main-menu li a:hover {
    text-decoration: underline;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.content-area {
    flex: 3; /* 主内容区域占3份宽度 */
}

/* 文章样式 */
article {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

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

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.post-meta span {
    margin-right: 1rem;
}

.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.post-content {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 3px;
}

.read-more:hover {
    background-color: #2980b9;
}

/* 侧边栏样式 */
.sidebar {
    flex: 1; /* 侧边栏占1份宽度 */
}

.widget {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: #3498db;
    text-decoration: none;
}

.widget ul li a:hover {
    text-decoration: underline;
}

/* 搜索框样式 */
.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
}

.search-submit {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

/* 分页样式 */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: white;
    color: #3498db;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 0.25rem;
}

.pagination a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 评论区域样式 */
.comments-area {
    background: white;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-author {
    font-weight: bold;
}

.comment-metadata {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.comment-form textarea {
    min-height: 150px;
}

.form-submit input {
    width: auto;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 响应式设计 - 适配移动设备 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column; /* 在小屏幕上改为垂直布局 */
    }
    
    .main-menu {
        flex-direction: column; /* 菜单改为垂直显示 */
        gap: 0.5rem;
    }
}
