/* 留言板样式 */
.message-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.message-board {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.board-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px 30px;
    border-bottom: none;
}

.board-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.board-header .stats {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
}

/* 发布留言区域 */
.post-message {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.post-message textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s;
}

.post-message textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.btn-post {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.char-count {
    color: #6c757d;
    font-size: 13px;
}

/* 留言列表 */
.message-list {
    padding: 20px 30px 30px;
}

.message-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
    position: relative;
}

.message-item:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
    border-color: #667eea;
}

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

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 3px;
}

.user-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
}

.message-time {
    color: #95a5a6;
    font-size: 13px;
}

.message-content {
    color: #34495e;
    line-height: 1.8;
    font-size: 14px;
    margin-bottom: 15px;
    word-wrap: break-word;
}

.message-actions {
    display: flex;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    color: #95a5a6;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    color: #667eea;
}

.action-btn.liked {
    color: #e74c3c;
}

/* 回复区域 */
.reply-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: none;
}

.reply-section.active {
    display: block;
}

.reply-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.reply-user {
    color: #667eea;
    font-weight: 600;
    margin-right: 8px;
}

.reply-content {
    color: #34495e;
}

.reply-input-box {
    margin-top: 10px;
}

.reply-input-box textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    resize: vertical;
}

.reply-input-box .btn-reply {
    margin-top: 8px;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 6px 20px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
}

/* 筛选和排序 */
.filter-bar {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* 响应式 */
@media (max-width: 768px) {
    .message-container {
        padding: 20px 0;
    }
    
    .post-message, .message-list {
        padding: 20px 15px;
    }
    
    .board-header {
        padding: 20px 15px;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}


/* 额外的美化样式 */

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 留言项动画 */
.message-item {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮点击效果 */
.btn-post:active, .btn-reply:active {
    transform: translateY(-1px) scale(0.98);
}

/* 头像渐变色变化 */
.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

/* 点赞按钮动画 */
.like-btn {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.like-btn:active {
    transform: scale(1.3);
}

.like-btn.liked {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.2); }
}

/* 回复框展开动画 */
.reply-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.reply-section.active {
    max-height: 1000px;
    transition: max-height 0.6s ease-in;
}

/* 筛选标签悬停效果 */
.filter-tab {
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.filter-tab:hover::before {
    left: 100%;
}

/* 输入框聚焦效果 */
.post-message textarea:focus,
.reply-input-box textarea:focus {
    transform: scale(1.01);
}

/* 空状态动画 */
.empty-state {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 板块头部文字阴影 */
.board-header h3 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* 留言内容链接样式 */
.message-content a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s;
}

.message-content a:hover {
    color: #764ba2;
}

/* 回复项悬停效果 */
.reply-item {
    transition: all 0.3s;
}

.reply-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* 统计数字动画 */
.board-header .stats strong {
    display: inline-block;
    transition: transform 0.3s;
}

.board-header .stats strong:hover {
    transform: scale(1.2);
    color: #ffd700;
}

/* 用户徽章闪烁效果 */
.user-badge {
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,255,255,0.5); }
    50% { box-shadow: 0 0 15px rgba(255,255,255,0.8); }
}

/* 操作按钮组间距优化 */
.message-actions .action-btn {
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s;
}

.message-actions .action-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* 分页样式优化 */
.meneame a, .meneame span {
    transition: all 0.3s;
}

.meneame a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 字符计数器颜色变化 */
.char-count {
    transition: color 0.3s;
}

/* 当接近限制时变红 */
.char-count.warning {
    color: #e74c3c;
    font-weight: bold;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 成功提示样式 */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: slideInRight 0.5s ease-out;
    z-index: 9999;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 滚动条美化 */
.message-list::-webkit-scrollbar {
    width: 8px;
}

.message-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.message-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.message-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 移动端优化 */
@media (max-width: 576px) {
    .message-container {
        padding: 15px 0;
    }
    
    .board-header h3 {
        font-size: 20px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .message-content {
        font-size: 13px;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .filter-tab {
        font-size: 12px;
        padding: 6px 15px;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .message-board {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .message-item {
        background: #34495e;
        border-color: #4a5f7f;
    }
    
    .post-message {
        background: #34495e;
    }
    
    .post-message textarea {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #4a5f7f;
    }
    
    .filter-bar {
        background: #34495e;
        border-color: #4a5f7f;
    }
    
    .reply-item {
        background: #2c3e50;
    }
}

/* 打印样式 */
@media print {
    .message-container {
        background: white;
    }
    
    .post-message,
    .filter-bar,
    .message-actions,
    .reply-section {
        display: none;
    }
    
    .message-item {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
}
