/* 西亚云漫画 - 现代简洁风格样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.5;
    color: #1f2937;
    overflow-x: hidden;
    font-size: 14px;
}

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

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 按钮特效 */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::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.6s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* 输入框样式 */
.input-glow {
    transition: all 0.3s ease;
}

.input-glow:focus {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
}

/* 导航栏特效 */
.nav-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 页面过渡动画 */
.page-transition {
    animation: fadeInUp 0.8s ease-out;
}

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

/* 排行榜选项卡样式 */
.ranking-tab {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ranking-tab::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;
}

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

.ranking-tab.active {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* 排行榜项目动画 */
.ranking-item {
    transition: all 0.3s ease;
    position: relative;
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.ranking-item:hover::before {
    opacity: 1;
}

/* 计数器动画 */
.counter {
    display: inline-block;
}

/* 返回顶部按钮 */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.show {
    transform: translateY(0);
    opacity: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #ef4444);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #dc2626);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .ranking-item > * {
        margin-bottom: 0.5rem;
    }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 文本渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 数据可视化效果 */
.data-bar {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #ef4444);
    border-radius: 2px;
    animation: dataFlow 2s ease-in-out infinite;
}

@keyframes dataFlow {
    0%, 100% {
        transform: scaleX(0.8);
    }
    50% {
        transform: scaleX(1);
    }
}

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

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

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .card-hover:hover {
        transform: none;
        box-shadow: none;
    }
    
    .ranking-item:hover::before {
        opacity: 0;
    }
    
    .btn-glow:hover::before {
        left: -100%;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .text-gradient {
        background: #000;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .page-transition,
    .card-hover,
    .ranking-item,
    .ranking-tab {
        animation: none;
        transition: none;
    }
}

/* 焦点可见性 */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 无障碍支持 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}