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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #faf8f5;
    color: #333;
    line-height: 1.8;
}

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

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

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

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

.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.diary-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.diary-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.diary-card-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.diary-card-content {
    padding: 24px;
}

.diary-card-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.diary-card-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #2c2c2c;
}

.diary-card-summary {
    font-size: 0.95rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.diary-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.diary-detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.diary-detail-date {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 10px;
}

.diary-detail-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #2c2c2c;
}

.back-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5a6fd6;
}

.diary-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.diary-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #444;
}

.diary-content img {
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.diary-content p + img {
    margin-top: 25px;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 0.9rem;
}

.placeholder-cover {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.9rem;
}

.placeholder-img {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    header {
        padding: 40px 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .diary-grid {
        padding: 30px 0;
        gap: 20px;
    }
    
    .diary-detail-title {
        font-size: 1.6rem;
    }
    
    .diary-content {
        padding: 25px;
    }
    
    .diary-content p {
        font-size: 1rem;
    }
}
