/* message-board.css - 留言板页面样式 */

/* 留言板容器 */
.message-board-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* 留言统计 */
.messages-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.messages-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
}

.messages-stats .stat-item i {
    font-size: 1.3rem;
    color: #2563eb;
}

.messages-stats .stat-item strong {
    color: #1e293b;
    margin: 0 3px;
}

/* 筛选和排序 */
.messages-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.filter-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
}

/* 留言卡片 */
.message-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.message-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.message-info {
    flex: 1;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.author-name {
    font-weight: 600;
    color: #1e293b;
}

.author-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.author-badge.member {
    background: #dbeafe;
    color: #2563eb;
}

.author-badge.vip {
    background: #fef3c7;
    color: #f59e0b;
}

.author-badge.expert {
    background: #dcfce7;
    color: #10b981;
}

.message-time {
    font-size: 0.85rem;
    color: #94a3b8;
}

.message-tag {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.message-tag.question {
    background: #dbeafe;
    color: #2563eb;
}

.message-tag.suggestion {
    background: #fef3c7;
    color: #f59e0b;
}

.message-tag.praise {
    background: #dcfce7;
    color: #10b981;
}

.message-content {
    margin-bottom: 15px;
}

.message-content p {
    color: #475569;
    line-height: 1.8;
}

/* 留言操作 */
.message-actions {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: #2563eb;
}

/* 回复区 */
.replies-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.reply {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.reply:first-child {
    margin-top: 15px;
    padding-top: 0;
    border-top: none;
}

.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.reply-content {
    flex: 1;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reply-author {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.reply-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.reply-badge.expert {
    background: #dcfce7;
    color: #10b981;
}

.reply-time {
    font-size: 0.8rem;
    color: #94a3b8;
}

.reply-content p {
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* 侧边栏 */
.messages-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 发布留言小工具 */
.post-message-widget {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-message-widget h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.post-message-widget .form-group {
    margin-bottom: 15px;
}

.post-message-widget label {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9rem;
}

.post-message-widget select,
.post-message-widget input[type="text"],
.post-message-widget textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.post-message-widget select:focus,
.post-message-widget input[type="text"]:focus,
.post-message-widget textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.post-message-widget textarea {
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.login-prompt {
    margin-top: 15px;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-prompt i {
    font-size: 1rem;
}

.login-prompt a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* 热门话题 */
.hot-topics {
    list-style: none;
}

.hot-topics li {
    margin-bottom: 12px;
}

.hot-topics a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hot-topics a:hover {
    background: #f8fafc;
    color: #2563eb;
}

.hot-topics span {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* 公告 */
.announcement {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-item {
    display: flex;
    gap: 15px;
}

.announcement-item > i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 3px;
}

.announcement-item h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 5px;
}

.announcement-item p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 5px;
}

.announcement-time {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* 联系信息 */
.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 0.9rem;
}

.contact-info i {
    color: #2563eb;
    width: 20px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .message-board-container {
        grid-template-columns: 1fr;
    }
    
    .messages-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .messages-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .messages-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .message-header {
        flex-wrap: wrap;
    }
    
    .reply {
        flex-direction: column;
    }
}
