/* 留言板布局 */
.message-board {
    max-width: 800px;
    margin: 0 auto;
}

/* 留言表单 */
.message-form {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.message-form h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #666;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e60012;
}

.submit-btn {
    background: #e60012;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: #c70012;
}

/* 留言列表 */
.message-list {
    margin-bottom: 2rem;
}

.message-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.author {
    color: #333;
    font-weight: bold;
}

.time {
    color: #888;
    font-size: 0.9rem;
}

.message-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.message-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
}

.reply-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e60012;
    color: #e60012;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.reply-btn:hover {
    background: #fff5f5;
}

/* 回复列表 */
.reply-list {
    margin-top: 1rem;
    padding-left: 2rem;
    border-left: 2px solid #f0f0f0;
}

.reply-item {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.reply-content {
    color: #666;
    line-height: 1.6;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: #e60012;
    color: #fff;
    border-color: #e60012;
}

.page-btn.next {
    padding: 0.5rem 1.5rem;
}

/* 中国风元素 */
.message-item {
    border: 1px solid #e8e8e8;
    position: relative;
}

.message-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #e60012, #c70012);
    border-radius: 2px;
}

/* 动画效果 */
.message-item {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-form {
        padding: 1.5rem;
    }

    .message-item {
        padding: 1rem;
    }

    .reply-list {
        padding-left: 1rem;
    }

    .message-header,
    .reply-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 表单验证样式 */
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #ff4d4d;
}

.form-group input:invalid:focus,
.form-group textarea:invalid:focus {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.2);
}

/* 加载动画 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
} 