:root {
    --primary-color: #8b5a2b; /* 木色 */
    --accent-color: #d35400; /* 强调色（暖橙） */
    --text-color: #4a4a4a; /* 深灰，柔和文字 */
    --light-bg: #fdfbf7; /* 米白/纸色 */
    --border-color: #e8e0d5;
    --white: #ffffff;
    --spacing-unit: 1rem;
    --shadow: 0 4px 6px rgba(139, 90, 43, 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

/* Navigation */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'KaiTi', 'STKaiti', serif; /* 手写风格字体 */
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: '🔨'; /* 简单的图标 */
}

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

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 5px;
    transition: color 0.3s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
    background-image: radial-gradient(#e8e0d5 1px, transparent 1px);
    background-size: 20px 20px; /* 点阵背景 */
}

.hero-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'KaiTi', 'STKaiti', serif;
}

.search-bar {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-input {
    padding: 12px 20px;
    width: 300px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
}

/* Filter Section */
.filter-section {
    padding: 20px 0;
    text-align: center;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Sections */
.section-block {
    padding: 60px 0;
}

.bg-light {
    background-color: #f4f1ea; /* 稍深一点的米色 */
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
    font-family: 'KaiTi', 'STKaiti', serif;
}

.section-title::after {
    content: '✨';
    display: block;
    margin-top: 10px;
    font-size: 1.2rem;
}

/* Craft Grid */
.craft-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.craft-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.craft-card:hover {
    transform: translateY(-5px);
}

.craft-img-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
    background-color: #eee;
    overflow: hidden;
}

.craft-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.craft-card:hover .craft-img {
    transform: scale(1.05);
}

.craft-content {
    padding: 20px;
}

.craft-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.craft-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.craft-badge {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.craft-desc {
    font-size: 0.95rem;
    color: #555;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Insights List */
.insight-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.insight-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-color);
}

.insight-header {
    margin-bottom: 15px;
}

.insight-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.insight-meta {
    font-size: 0.9rem;
    color: #888;
}

.insight-content-preview {
    color: #555;
    margin-bottom: 20px;
}

.insight-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Comment UI Simulation */
.comment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.comment-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    resize: vertical;
}

.btn-sm {
    padding: 5px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

.icp-info {
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .search-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .search-input {
        width: 100%;
    }
}
