/* 全新科技风格样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;800;900&family=Orbitron:wght@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: #ffffff;
    background: #000000;
    overflow-x: hidden;
    font-size: 14px;
}

/* 科技网格背景 */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 浮动粒子效果 */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #38bdf8, #4ade80);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 7s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 浮动漫画元素 */
.floating-comic {
    position: absolute;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #38bdf8, #4ade80);
    border-radius: 12px;
    opacity: 0.1;
    animation: floatComic 20s infinite ease-in-out;
}

.floating-comic-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-comic-2 {
    top: 50%;
    right: 20%;
    animation-delay: 7s;
}

.floating-comic-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 14s;
}

@keyframes floatComic {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* 发光动画 */
.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(56, 189, 248, 0.8), 0 0 40px rgba(74, 222, 128, 0.3);
    }
}

/* 脉冲动画 */
.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 排行榜选项卡样式 */
.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);
}

/* 排行榜项目动画 */
.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(56, 189, 248, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 24px;
}

.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: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8, #4ade80);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0ea5e9, #22c55e);
}

/* 响应式设计 */
@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;
    }
    
    .tech-grid {
        background-size: 30px 30px;
    }
    
    .floating-comic {
        width: 60px;
        height: 75px;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
    }
    
    .ranking-item > * {
        margin-bottom: 1rem;
    }
    
    /* 移动端字体调整 */
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .nav-link {
        font-size: 0.875rem !important;
    }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(56, 189, 248, 0.3);
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

.card-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(74, 222, 128, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.card-hover:hover::after {
    opacity: 1;
}

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

/* 按钮特效 */
.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(56, 189, 248, 0.3);
    border-color: #38bdf8;
}

/* 导航栏特效 */
.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);
    }
}

/* 科技感边框 */
.tech-border {
    position: relative;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(74, 222, 128, 0.1));
    background-clip: padding-box;
}

.tech-border::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, #38bdf8, #4ade80);
}

/* 数据可视化效果 */
.data-bar {
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #4ade80);
    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;
}