/* 留言板页面样式 */
.guestbook-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

/* 留言统计 */
.message-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stats-item {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-5px);
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #00a8ff;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #666;
    font-size: 1rem;
}

/* 留言表单 */
.message-form {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.message-form h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00a8ff;
    outline: none;
}

/* 评分星星 */
.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    font-size: 2rem;
    color: #ddd;
    transition: color 0.3s ease;
}

.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label {
    color: #ffd700;
}

.message-form button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #00a8ff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.message-form button:hover {
    background-color: #0088cc;
}

/* 留言列表 */
.message-list {
    margin-top: 3rem;
}

.message-list h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
}

.message-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.message-filter button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-filter button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.message-filter button.active {
    background-color: #00a8ff;
    color: #fff;
}

/* 留言项目 */
.message-item {
    display: flex;
    gap: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.message-item:hover {
    transform: translateY(-5px);
}

.message-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
}

.message-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.message-rating {
    color: #ffd700;
}

.message-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.message-actions {
    display: flex;
    gap: 1rem;
}

.like-button,
.reply-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-button:hover,
.reply-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.like-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 回复区域 */
.reply-area {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.reply-area textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    resize: vertical;
}

.submit-reply {
    padding: 0.5rem 1rem;
    background-color: #00a8ff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-reply:hover {
    background-color: #0088cc;
}

/* 回复列表 */
.reply-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.reply-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reply-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-content {
    flex: 1;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-header h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin: 0;
}

.reply-date {
    color: #666;
    font-size: 0.8rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: #e0e0e0;
}

.pagination button.active {
    background-color: #00a8ff;
    color: #fff;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .message-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .message-filter {
        flex-direction: column;
    }

    .message-filter button {
        width: 100%;
    }

    .message-item {
        flex-direction: column;
    }

    .message-avatar {
        margin: 0 auto;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.message-item:nth-child(1) { animation-delay: 0.1s; }
.message-item:nth-child(2) { animation-delay: 0.2s; }
.message-item:nth-child(3) { animation-delay: 0.3s; }
.message-item:nth-child(4) { animation-delay: 0.4s; }

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00a8ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 