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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
}

.main-container {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-emoji {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    display: block;
}

nav {
    padding: 1rem 2rem;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

nav a {
    color: #555;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

nav a:hover {
    background-color: #f0f0f0;
}

nav a.active {
    background-color: #667eea;
    color: white;
}

.meituan-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.meituan-link:hover {
    opacity: 0.9;
}

.content-wrapper {
    padding: 2rem;
}

.welcome-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-text h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.welcome-text p {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

.welcome-image img {
    width: 100%;
    border-radius: 12px;
}

.section {
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: #333;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.recent-posts {
    display: grid;
    gap: 1rem;
}

.post-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    background-color: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.post-content {
    padding: 0.8rem 1rem 0.8rem 0;
}

.post-date {
    color: #667eea;
    font-size: 0.85rem;
}

.post-content h3 {
    font-size: 1.1rem;
    margin: 0.3rem 0;
    color: #333;
}

.post-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.photo-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.photo-item-home {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.photo-item-home img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item-home:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    padding: 1rem 0.8rem 0.8rem;
    color: white;
    font-size: 0.9rem;
}

.view-all {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-view-all {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.stat-item {
    padding: 1rem;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* 日志页面 */
.diary-list {
    display: grid;
    gap: 1.2rem;
}

.diary-item {
    background-color: #fafafa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.diary-item:hover {
    background-color: #f5f5f5;
}

.diary-date {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.diary-content {
    color: #555;
    line-height: 1.8;
}

.diary-content p {
    margin-bottom: 0.8rem;
}

.diary-image {
    margin-top: 1rem;
    border-radius: 8px;
    max-width: 100%;
    max-height: 300px;
}

/* 相册页面 */
.photo-category {
    margin-bottom: 2rem;
}

.photo-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.photo-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.photo-card:hover {
    transform: translateY(-3px);
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* 关于页面 */
.about-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.about-avatar {
    text-align: center;
}

.avatar-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
}

.about-text h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 1.5rem 0 0.8rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: #666;
    line-height: 1.9;
}

.skills {
    margin-top: 1rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin: 0.2rem;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.85rem;
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}

footer a {
    color: #999;
    text-decoration: none;
}

@media (max-width: 768px) {
    .welcome-section {
        grid-template-columns: 1fr;
    }
    
    .welcome-image {
        order: -1;
    }
    
    .post-card {
        grid-template-columns: 1fr;
    }
    
    .post-card img {
        height: 180px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .photo-grid-home {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .avatar-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 2rem 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .header-emoji {
        font-size: 2.5rem;
    }
    
    nav {
        padding: 0.8rem;
    }
    
    nav a {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
}
