/* ============================================
   SciDownload - 科幻特效样式
   ============================================ */

/* ---- 霓虹边框动画 ---- */
@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0,212,255,0.3), 0 0 20px rgba(0,212,255,0.1); }
    50% { box-shadow: 0 0 10px rgba(0,212,255,0.6), 0 0 40px rgba(0,212,255,0.3), 0 0 80px rgba(0,212,255,0.1); }
}
@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes scanLine {
    0% { top: -100%; }
    100% { top: 100%; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes dataStream {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(20px); }
}
@keyframes hexPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---- 科幻卡片增强 ---- */
.software-card {
    position: relative;
    overflow: hidden;
}
.software-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 212, 255, 0.03) 50%,
        transparent 70%
    );
    transform: rotate(0deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.software-card:hover::after {
    transform: rotate(180deg);
}

/* ---- 霓虹发光按钮 ---- */
.btn-download-main {
    position: relative;
    overflow: hidden;
}
.btn-download-main::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;
}
.btn-download-main:hover::before { left: 100%; }

/* ---- 科幻数据流装饰 ---- */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        linear-gradient(90deg, rgba(0,212,255,0.05) 1px, transparent 1px) 0 0 / 60px 60px,
        linear-gradient(0deg, rgba(0,212,255,0.05) 1px, transparent 1px) 0 0 / 60px 60px;
    pointer-events: none;
    z-index: 1;
}

/* ---- 轮播科幻增强 ---- */
.carousel-slide::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: borderFlow 3s linear infinite;
}

/* ---- 分类卡片科幻效果 ---- */
.category-nav-item {
    position: relative;
    overflow: hidden;
}
.category-nav-item::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
    background-size: 300% 300%;
    border-radius: calc(var(--radius) + 2px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderFlow 3s ease infinite;
}
.category-nav-item:hover::before { opacity: 1; }

/* ---- 科幻网格背景 ---- */
.software-section {
    position: relative;
}
.software-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0,212,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(123,47,255,0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ---- 标题科幻装饰 ---- */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}
.section-title { position: relative; }

/* ---- 卡片悬停光效 ---- */
.software-card:hover {
    animation: neonPulse 2s ease-in-out infinite;
}

/* ---- 科幻角标 ---- */
.software-card .card-thumb::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    border-style: solid;
    border-width: 0 28px 28px 0;
    border-color: transparent rgba(0, 212, 255, 0.3) transparent transparent;
}

/* ---- 页面英雄科幻装饰 ---- */
.page-hero {
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -50%; left: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(123,47,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- 详情页科幻装饰 ---- */
.card-panel {
    position: relative;
    overflow: hidden;
}
.card-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
    opacity: 0.6;
}

/* ---- 评论头像颜色循环 ---- */
.comment-item:nth-child(1) .comment-avatar { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.comment-item:nth-child(2) .comment-avatar { background: linear-gradient(135deg, #7b2fff, #5b1fcc); }
.comment-item:nth-child(3) .comment-avatar { background: linear-gradient(135deg, #ff6b35, #cc4400); }
.comment-item:nth-child(4) .comment-avatar { background: linear-gradient(135deg, #00ff88, #00cc66); }
.comment-item:nth-child(5) .comment-avatar { background: linear-gradient(135deg, #ffcc00, #cc9900); }
.comment-item:nth-child(6n) .comment-avatar { background: linear-gradient(135deg, #ff3366, #cc0033); }

/* ---- 科幻加载动画 ---- */
.loading-ring {
    display: inline-block;
    width: 40px; height: 40px;
    border: 3px solid rgba(0,212,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotateRing 0.8s linear infinite;
}

/* ---- 霓虹文字 ---- */
.neon-text {
    color: var(--primary);
    text-shadow: 
        0 0 7px var(--primary),
        0 0 10px var(--primary),
        0 0 21px var(--primary),
        0 0 42px rgba(0,212,255,0.5);
}

/* ---- 科幻分割线 ---- */
.sci-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    margin: 24px 0;
    opacity: 0.5;
}

/* ---- 数字计数器科幻效果 ---- */
.stat-num, .stat-val {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ---- 科幻进度条 ---- */
.sci-progress {
    height: 4px;
    background: rgba(0,212,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.sci-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    position: relative;
}
.sci-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: rgba(255,255,255,0.4);
    animation: scanLine 1.5s linear infinite;
}

/* ---- 科幻徽章 ---- */
.badge-scifi {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 4px;
    font-size: 11px;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

/* ---- 悬停时的扫描线效果 ---- */
.software-card:hover .card-thumb::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: rgba(0,212,255,0.6);
    animation: scanLine 1s linear infinite;
    z-index: 5;
}

/* ---- 科幻输入框聚焦 ---- */
.form-control:focus {
    animation: neonPulse 2s ease-in-out infinite;
}

/* ---- 页脚科幻装饰 ---- */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
}
.site-footer { position: relative; }

/* ---- 下载按钮脉冲 ---- */
@keyframes downloadPulse {
    0% { box-shadow: 0 0 0 0 rgba(123,47,255,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(123,47,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(123,47,255,0); }
}
.btn-download {
    animation: downloadPulse 2s infinite;
}

/* ---- 科幻光晕背景 ---- */
body::before {
    content: '';
    position: fixed;
    top: -50vh; left: -50vw;
    width: 200vw; height: 200vh;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0,212,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(123,47,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 0%, rgba(5,10,20,0.8) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ---- 卡片内容区科幻线条 ---- */
.card-body::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ---- 科幻滚动条 ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
    background: rgba(0,212,255,0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- 文字选中效果 ---- */
::selection {
    background: rgba(0,212,255,0.3);
    color: #fff;
}
