/* 增强视觉效果CSS文件 */

/* 全局增强效果 */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #1f4e79);
}

/* 页面加载动画 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 增强的文章卡片效果 */
.post {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9, #1abc9c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover::before {
    opacity: 1;
}

.post::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3498db, #2980b9, #1abc9c, #e74c3c);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover::after {
    opacity: 0.1;
}

/* 增强的侧边栏效果 */
.sidebar {
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover::before {
    opacity: 1;
}

/* 增强的标签项效果 */
.tag-item {
    position: relative;
    overflow: hidden;
}

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

.tag-item:hover::before {
    left: 100%;
}

/* 增强的头像效果 */
.comment-avatar img {
    position: relative;
    z-index: 1;
}

/* 增强的按钮效果 */
.pagination-container a {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1e1e 0%, #2c2c2c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 增强的公告板效果 */
.announcement-board {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.announcement-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #1abc9c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.announcement-board:hover::before {
    opacity: 1;
}

/* 文字发光效果 */
.glow-text {
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    transition: text-shadow 0.3s ease;
}

.glow-text:hover {
    text-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
}

/* 浮动动画 */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 脉冲动画 */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 旋转动画 */
.rotate-animation {
    animation: rotate 10s linear infinite;
}

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

/* 渐变背景动画 */
.gradient-animation {
    background: linear-gradient(45deg, #3498db, #2980b9, #1abc9c, #e74c3c);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

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

/* 响应式增强 */
@media (max-width: 768px) {
    .post::after,
    .sidebar::before {
        display: none;
    }
    
    .enhanced-effects {
        transform: none !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .post {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .announcement-board {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .post,
    .announcement-board {
        border: 2px solid #000;
    }
    
    .tag-item {
        border: 1px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .sidebar,
    .pagination-container,
    .enhanced-effects {
        display: none !important;
    }
    
    .post {
        box-shadow: none !important;
        border: 1px solid #000;
        break-inside: avoid;
    }
}
