/* message_board.css - 留言板专用样式 */
.message-board {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px; /* 响应式设计中的padding */
}

/* 错误和成功消息 */
.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-align: left;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
}

.success-message {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
    text-align: left;
    border-left: 4px solid #27ae60;
    font-weight: 500;
}

/* 留言表单样式 */
.message-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.message-form h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.message-form textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    background: white;
}

.message-form textarea:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
    background: #fff;
}

.message-form button {
    margin-top: 15px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
}

/* 登录提示样式 */
.login-prompt {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-prompt p {
    margin: 0;
    color: #856404;
    font-size: 1.1rem;
    font-weight: 500;
}

.login-prompt a {
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-prompt a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* 留言列表样式 */
.messages-list {
    margin-top: 40px;
    max-height: 70vh;
    overflow-y: auto;
}

.messages-list h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* 留言项样式 */
.message-item {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.message-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #28a745, #20c997);
}

.message-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.message-item:nth-child(even) {
    border-left-color: #4a6fa5;
}

.message-item:nth-child(even)::before {
    background: linear-gradient(to bottom, #4a6fa5, #6b8cbc);
}

.message-item:nth-child(3n) {
    border-left-color: #6f42c1;
}

.message-item:nth-child(3n)::before {
    background: linear-gradient(to bottom, #6f42c1, #8e63d2);
}

/* 无留言提示样式 */
.no-messages {
    text-align: center;
    padding: 60px 30px;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-messages p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

.no-messages::before {
    content: "💬";
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-board {
        max-width: 768px;
    }

    .message-form {
        padding: 20px;
    }

    .message-item {
        padding: 20px;
    }

    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .message-time {
        align-self: flex-start;
    }

    .message-content {
        padding: 12px;
        font-size: 0.95rem;
    }

    .no-messages {
        padding: 40px 20px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动条样式 */
.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
