/* ==================== 高科技特效样式 ==================== */

/* 3D 银河容器 */
.galaxy-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #0d1330 0%, #0a0e1a 55%, #06080f 100%);
}

.galaxy-stage canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.galaxy-stage .galaxy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    z-index: 2;
    padding: 0 var(--space-md);
}

.galaxy-stage .galaxy-overlay .hint {
    margin-top: var(--space-lg);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: hintPulse 3s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Matrix 数字雨容器 */
.matrix-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.matrix-stage canvas {
    display: block;
}

.matrix-stage .matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    z-index: 2;
    padding: 0 var(--space-md);
}

.matrix-stage .matrix-overlay .subtitle-glow {
    color: #00ff9d;
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.6), 0 0 60px rgba(0, 255, 157, 0.3);
}

/* ==================== 赛博空间页面 ==================== */

.cyber-page {
    background: #05070d;
    color: #e6edf3;
}

.cyber-page .navbar {
    background: rgba(5, 7, 13, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.15);
}

.cyber-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 赛博网格背景 */
.cyber-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(600px) rotateX(60deg) scale(2.2);
    transform-origin: center top;
    animation: gridScroll 20s linear infinite;
    pointer-events: none;
}

@keyframes gridScroll {
    from { background-position: 0 0; }
    to { background-position: 0 60px; }
}

.cyber-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--space-md);
}

.cyber-title {
    font-size: clamp(40px, 8vw, 88px);
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #00d9ff 0%, #7b6cff 50%, #ffd166 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 217, 255, 0.25);
    margin-bottom: var(--space-md);
}

.cyber-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    color: rgba(230, 237, 243, 0.8);
    letter-spacing: 3px;
    margin-bottom: var(--space-lg);
}

.cyber-subtitle .neon {
    color: #00ff9d;
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.8);
}

/* 分区标题 */
.cyber-section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.cyber-section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.cyber-section-title .tag {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid rgba(0, 217, 255, 0.4);
    border-radius: var(--radius-full);
    color: #00d9ff;
    font-size: 13px;
    letter-spacing: 4px;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.15) inset;
}

.cyber-section-title h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    background: linear-gradient(135deg, #e6edf3, #8aa2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 银河展示容器 */
.galaxy-demo {
    height: 62vh;
    min-height: 420px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 60px rgba(0, 217, 255, 0.1), inset 0 0 60px rgba(0, 0, 0, 0.4);
    margin-bottom: var(--space-lg);
    cursor: crosshair;
}

.galaxy-demo .galaxy-overlay h3 {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
    margin-bottom: var(--space-sm);
}

.galaxy-demo .galaxy-overlay p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 480px;
}

/* Matrix 展示容器 */
.matrix-demo {
    height: 55vh;
    min-height: 380px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 60px rgba(0, 255, 157, 0.08);
    margin-bottom: var(--space-lg);
}

.matrix-demo .matrix-overlay h3 {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    color: #00ff9d;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(0, 255, 157, 0.6);
    margin-bottom: var(--space-sm);
}

.matrix-demo .matrix-overlay p {
    color: rgba(0, 255, 157, 0.5);
    max-width: 480px;
}

/* 特效开关卡片 */
.cyber-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.cyber-card {
    background: rgba(13, 19, 35, 0.7);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
}

.cyber-card:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.15);
    transform: translateY(-4px);
}

.cyber-card h4 {
    color: #00d9ff;
    font-size: 16px;
    margin-bottom: var(--space-xs);
    letter-spacing: 1px;
}

.cyber-card p {
    color: rgba(230, 237, 243, 0.65);
    font-size: 13px;
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

/* 全屏特效按钮 */
.btn-neon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(0, 217, 255, 0.5);
    border-radius: var(--radius-full);
    color: #00d9ff;
    font-size: 14px;
    letter-spacing: 1px;
    background: rgba(0, 217, 255, 0.08);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-neon:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
    color: #fff;
}

.btn-neon-green {
    border-color: rgba(0, 255, 157, 0.5);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.btn-neon-green:hover {
    background: rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.4);
    color: #fff;
}

/* 全屏特效遮罩 */
.effect-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    overflow: hidden;
}

.effect-fullscreen .effect-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.effect-fullscreen .effect-close:hover {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.6);
    box-shadow: 0 0 30px rgba(255, 80, 80, 0.4);
}

.effect-fullscreen .effect-label {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 5px;
    font-size: 14px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
}

/* 动效数字（性能统计卡片） */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-box {
    background: rgba(13, 19, 35, 0.7);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d9ff, transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.stat-box .stat-value {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    background: linear-gradient(135deg, #00d9ff, #7b6cff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-box .stat-label {
    color: rgba(230, 237, 243, 0.6);
    font-size: 13px;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* 数据流条 */
.data-stream {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: var(--space-sm);
    font-size: 12px;
    color: rgba(0, 255, 157, 0.7);
    letter-spacing: 1px;
}

.data-stream .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff9d;
    box-shadow: 0 0 10px #00ff9d;
    animation: dotBlink 1.2s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 首页 hero 银河容器（可选，通过 body 类启用） */
body.has-galaxy-hero .hero-bg {
    background: transparent;
}

/* 响应式 */
@media (max-width: 768px) {
    .galaxy-demo, .matrix-demo {
        height: 45vh;
        min-height: 300px;
    }
}
