/* 论坛数据加载进度条和动画样式 */

/* 加载遮罩层 */
.forum-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.forum-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 加载容器 */
.forum-loading-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.forum-loading-overlay.active .forum-loading-container {
    transform: scale(1);
}

/* 加载标题 */
.forum-loading-title {
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 进度条容器 */
.forum-progress-container {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

/* 进度条 */
.forum-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 进度条动画效果 */
.forum-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 进度百分比 */
.forum-progress-percent {
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

/* 进度消息 */
.forum-progress-message {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 20px;
}

/* 加载动画 */
.forum-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 奇迹MU风格的装饰元素 */
.forum-loading-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid #FFD700;
    border-radius: 50%;
    opacity: 0.1;
    animation: rotate 10s linear infinite;
}

.forum-loading-decoration:nth-child(1) {
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.forum-loading-decoration:nth-child(2) {
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* 成功状态 */
.forum-loading-success {
    color: #4CAF50;
}

.forum-loading-success .forum-loading-spinner {
    border-top-color: #4CAF50;
}

/* 错误状态 */
.forum-loading-error {
    color: #f44336;
}

.forum-loading-error .forum-loading-spinner {
    border-top-color: #f44336;
    animation: none;
}

/* 重试按钮 */
.forum-retry-button {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.forum-retry-button:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-loading-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .forum-loading-title {
        font-size: 20px;
    }
    
    .forum-progress-percent {
        font-size: 16px;
    }
}

/* 数据刷新按钮样式 */
.forum-refresh-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forum-refresh-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.forum-refresh-button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.forum-refresh-button .fa-sync-alt {
    transition: transform 0.3s ease;
}

.forum-refresh-button.loading .fa-sync-alt {
    animation: spin 1s linear infinite;
}

/* 论坛内容淡入动画 */
.forum-content {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.forum-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 版块卡片悬停效果增强 */
.forum-category-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.forum-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.forum-category-card:hover::before {
    left: 100%;
}

.forum-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}