/*
Theme Name: Minimalist Beauty
Theme URI: https://example.com/minimalist-beauty
Description: 一款极简唯美且功能完善的WordPress主题，支持PHP 8.3，对中文友好。
Version: 1.0.0
Author: Theme Developer
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: minimal, clean, beautiful, responsive, chinese, php83
Text Domain: minimalist-beauty

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333;
    --secondary-color: #555;
    --accent-color: #0073aa;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --border-color: #eee;
    --text-color: #333;
    --text-secondary: #666;
    --shadow: 0 2px 15px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    transition: var(--transition);
}

/* 面包屑导航 */
.breadcrumb {
    margin: 20px 0;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 确保内容区域在面包屑下方 */
.site-content {
    clear: both;
}

/* 头部 */
.site-header {
    background-color: var(--card-background);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.site-branding {
    text-align: center;
    margin-bottom: 15px;
}

.site-title {
    font-size: 28px;
    font-weight: 300;
    color: #333;
    text-decoration: none;
    letter-spacing: 1px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
    font-weight: 300;
}

/* 导航菜单 */
.main-navigation {
    text-align: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle .menu-icon {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.4s;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 15px;
}

.main-navigation a {
    text-decoration: none;
    color: #555;
    font-size: 16px;
    font-weight: 300;
    padding: 8px 0;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation a:hover {
    color: #333;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #333;
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* 主要内容区域 */
.site-content {
    display: flex;
    flex-wrap: wrap;
    margin: 40px 0;
}

.site-main {
    flex: 1;
    min-width: 0;
}

@media (min-width: 769px) {
    .site-main {
        margin-right: 40px;
    }
}

.post {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.post-title {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 10px;
}

.post-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.post-title a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--accent-color);
}

.post-title a:hover::after {
    width: 100px;
}

.post-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 25px;
    font-weight: 300;
}

.post-meta a {
    color: #888;
    text-decoration: none;
}

.post-meta a:hover {
    color: #333;
}

.post-thumbnail {
    margin: 20px 0;
    text-align: center;
}

.post-thumbnail img {
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

.post-content {
    margin-bottom: 30px;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 30px 0 20px;
    color: #333;
    font-weight: 400;
}

.post-content h2 {
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: #0073aa;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 3px solid #0073aa;
    background-color: #f8f8f8;
    font-style: italic;
    color: #666;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.read-more:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 分页导航 */
.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* 侧边栏 */
.widget-area {
    width: 100%;
}

@media (min-width: 769px) {
    .widget-area {
        width: 300px;
    }
}

.widget {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    opacity: 1;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.widget-title {
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 20px;
    padding: 0 0 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #333;
}

/* 页脚 */
.site-footer {
    background-color: #fff;
    padding: 50px 0 30px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-widget-area {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 40px;
}

.footer-column {
    flex: 1;
    min-width: 0;
    padding: 0 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .footer-column {
        flex: 1 1 100%;
    }
}

.site-info {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.site-info a {
    color: #888;
    text-decoration: none;
}

.site-info a:hover {
    color: #333;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation ul.menu {
        display: none;
        flex-direction: column;
        background: var(--card-background);
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
    }
    
    .main-navigation ul.menu.open {
        display: flex;
    }
    
    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        padding: 15px 20px;
        text-align: left;
    }
    
    .post {
        padding: 25px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .site-content {
        margin: 30px 0;
    }
    
    .site-main {
        margin-right: 0;
    }
    
    .widget-area {
        width: 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
    }
}