:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --danger-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
    padding: 0;
    margin: 0;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

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

.post-form h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.posts-list {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.posts-list h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-color);
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.post-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.post-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.delete-btn {
    background-color: transparent;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    color: var(--danger-color);
    background-color: rgba(247, 37, 133, 0.1);
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.7;
}

.post-footer {
    display: flex;
    justify-content: flex-end;
}

.post-time {
    font-size: 0.9rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .post-form, .posts-list {
        padding: 15px;
    }
}