/*
Theme Name: Korean Blog
Theme URI: https://example.com
Author: 小红
Description: 韩式卡通风格个人博客主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: korean-blog
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* 字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 变量 - 会被 Customizer 覆盖 */
:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fad0c4;
    --bg-color: #ffecd2;
    --text-color: #555;
    --light-text: #888;
    --white: #fff;
    --border-radius: 20px;
    --shadow: 0 4px 15px rgba(255, 154, 158, 0.2);
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.8;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.3) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.3) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 100px 100px, 80px 80px, 60px 60px;
    pointer-events: none;
    z-index: -1;
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.site-logo:hover {
    color: #ff7b7f;
}

/* 导航 */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 搜索框 */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.search-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px 0;
}

/* 文章卡片 */
.post-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.3);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--light-text);
    padding-top: 15px;
    border-top: 1px solid #f5f5f5;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-date::before {
    content: '📅 ';
}

.post-reading-time::before {
    content: '⏱ ';
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 20px;
    background: var(--white);
    border-radius: 30px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: var(--white);
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 关于我小工具 */
.about-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: block;
    border: 4px solid var(--primary-color);
}

.about-name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
}

.about-bio {
    font-size: 14px;
    color: var(--light-text);
    text-align: center;
}

/* 分类小工具 */
.cat-links {
    list-style: none;
}

.cat-links li {
    margin-bottom: 10px;
}

.cat-links a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    background: #fff5f5;
    border-radius: 10px;
    transition: all 0.3s;
}

.cat-links a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 标签云 */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagcloud a {
    display: inline-block;
    padding: 5px 12px;
    background: #fff5f5;
    color: var(--text-color);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tagcloud a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 搜索页 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-field {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #f5f5f5;
    border-radius: 30px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-submit:hover {
    background: #ff7b7f;
    transform: translateY(-2px);
}

/* 文章页 */
.single-post {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.single-post .post-thumbnail {
    height: 400px;
}

.single-content {
    padding: 40px;
}

.single-content .post-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.post-content {
    font-size: 16px;
    line-height: 2;
}

.post-content h2 {
    margin: 30px 0 20px;
    color: var(--text-color);
}

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

.post-content img {
    max-width: 100%;
    border-radius: 15px;
    margin: 20px 0;
}

.post-content blockquote {
    background: #fff5f5;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 15px 15px 0;
    font-style: italic;
}

/* 评论 */
.comments-area {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-top: 30px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text-color);
}

.comment-list {
    list-style: none;
}

.comment {
    background: #fff5f5;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 10px;
}

.comment-date {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 15px;
}

.comment-content {
    line-height: 1.8;
}

.comment-reply {
    margin-top: 15px;
}

.comment-reply a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* 评论表单 */
.comment-reply-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #f5f5f5;
    border-radius: 15px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.form-submit {
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.form-submit:hover {
    background: #ff7b7f;
    transform: translateY(-2px);
}

/* 页脚 */
.site-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-top: 60px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px 0;
}

.footer-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #f5f5f5;
    color: var(--light-text);
    font-size: 14px;
}

/* 兔子轨道动画 */
.page-rabbit-orbit {
    position: fixed;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

.page-rabbit {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .single-content {
        padding: 25px;
    }
    
    .single-content .post-title {
        font-size: 24px;
    }
}