/* 基础样式重置和变量定义 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ff00;
    --secondary-color: #00ffff;
    --accent-color: #ff0080;
    --warning-color: #ffff00;
    --bg-color: #000000;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --font-cyber: 'Orbitron', monospace;
    --glitch-intensity: 2px;
    --rgb-shift: 3px;
}

body {
    font-family: var(--font-cyber);
    background: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
}

/* 隐藏页面滚动条但保持滚动功能 */
html {
    overflow: hidden;
}

/* 背景矩阵效果 */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 0, 0.03) 0%, transparent 50%);
}

/* 扫描线效果 */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 255, 0, 0.5) 50%
    );
    background-size: 100% 4px;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* 完全隐藏容器滚动条 */
.container::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit */
}

/* 头部样式 */
.cyber-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* 设备信息栏样式 */
.device-info-bar {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 0.8rem 0;
}

.device-info {
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 
        0 0 10px rgba(0, 255, 0, 0.3),
        inset 0 1px 0 rgba(0, 255, 0, 0.1);
    animation: device-info-pulse 3s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 300px;
}

.device-line {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.device-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.1) 50%,
        transparent 100%
    );
    animation: device-scan 4s linear infinite;
}

.device-label {
    color: var(--secondary-color);
    font-weight: 700;
    margin-right: 0.5rem;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    min-width: 60px;
    flex-shrink: 0;
}

.device-value {
    color: var(--primary-color);
    font-weight: 400;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.3);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 设备检测失败样式 */
.device-info.detection-failed {
    border-color: var(--warning-color);
    box-shadow: 
        0 0 10px rgba(255, 255, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 0, 0.1);
    animation: device-info-warning 2s ease-in-out infinite;
}

.device-info.detection-failed .device-value {
    color: var(--warning-color);
    text-shadow: 0 0 3px rgba(255, 255, 0, 0.5);
}

.device-info.detection-failed::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 0, 0.2) 50%,
        transparent 100%
    );
}

/* 设备类型特定样式 */
.mobile-device {
    border-color: var(--accent-color);
    box-shadow: 
        0 0 10px rgba(255, 0, 128, 0.3),
        inset 0 1px 0 rgba(255, 0, 128, 0.1);
}

.mobile-device .device-label {
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(255, 0, 128, 0.5);
}

.tablet-device {
    border-color: var(--warning-color);
    box-shadow: 
        0 0 10px rgba(255, 255, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 0, 0.1);
}

.tablet-device .device-label {
    color: var(--warning-color);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

/* 操作系统特定样式 */
.nexusos-os {
    border-color: #ff6600;
    background: rgba(255, 102, 0, 0.1);
    box-shadow: 
        0 0 15px rgba(255, 102, 0, 0.4),
        inset 0 1px 0 rgba(255, 102, 0, 0.2);
    animation: nexus-pulse 2s ease-in-out infinite;
}

.nexusos-os .device-label {
    color: #ff6600;
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

.nexusos-os .device-value {
    color: #ffaa66;
    text-shadow: 0 0 5px rgba(255, 170, 102, 0.4);
}

.nexusos-os::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 102, 0, 0.15) 50%,
        transparent 100%
    );
    animation: nexus-scan 3s linear infinite;
}

/* Linux系统样式 */
.linux-os, .ubuntu-os {
    border-color: #ff9500;
    box-shadow: 
        0 0 10px rgba(255, 149, 0, 0.3),
        inset 0 1px 0 rgba(255, 149, 0, 0.1);
}

.linux-os .device-label, .ubuntu-os .device-label {
    color: #ff9500;
    text-shadow: 0 0 5px rgba(255, 149, 0, 0.5);
}

/* macOS系统样式 */
.macos-os, .catalina-os, .mojave-os {
    border-color: #a855f7;
    box-shadow: 
        0 0 10px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(168, 85, 247, 0.1);
}

.macos-os .device-label, .catalina-os .device-label, .mojave-os .device-label {
    color: #a855f7;
    text-shadow: 0 0 5px rgba(168, 85, 247, 0.5);
}

/* 动画效果 */
@keyframes device-info-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes device-info-warning {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 
            0 0 10px rgba(255, 255, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 0, 0.1);
    }
    50% { 
        transform: scale(1.03);
        opacity: 1;
        box-shadow: 
            0 0 20px rgba(255, 255, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 0, 0.2);
    }
}

@keyframes device-scan {
    0% { 
        left: -100%;
    }
    100% { 
        left: 100%;
    }
}

@keyframes nexus-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.9;
        box-shadow: 
            0 0 15px rgba(255, 102, 0, 0.4),
            inset 0 1px 0 rgba(255, 102, 0, 0.2);
    }
    50% { 
        transform: scale(1.03);
        opacity: 1;
        box-shadow: 
            0 0 25px rgba(255, 102, 0, 0.6),
            inset 0 1px 0 rgba(255, 102, 0, 0.3);
    }
}

@keyframes nexus-scan {
    0% { 
        left: -100%;
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% { 
        left: 100%;
        opacity: 0.3;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .device-info {
        font-size: 0.65rem;
        padding: 0.5rem 1rem;
        margin: 0 1rem;
        min-width: auto;
        width: calc(100% - 2rem);
        max-width: 400px;
        gap: 0.2rem;
    }
    
    .device-info-bar {
        margin: 0.6rem 0;
    }
    
    .device-label {
        min-width: 50px;
        font-size: 0.65rem;
    }
    
    .device-value {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .device-line {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .device-info {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
        gap: 0.15rem;
    }
    
    .device-label {
        min-width: 45px;
        font-size: 0.6rem;
        margin-right: 0.3rem;
    }
    
    .device-value {
        font-size: 0.6rem;
    }
}

/* 故障效果标题 */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.main-title {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 800;
    background: linear-gradient(135deg, 
        #00ff00 0%, 
        #00ffaa 25%, 
        #00ff66 50%, 
        #66ff99 75%, 
        #00ff00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 2px 8px rgba(0, 255, 0, 0.3))
            drop-shadow(0 0 20px rgba(0, 255, 0, 0.1));
    animation: subtle-glow 6s ease-in-out infinite;
}

.main-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.15) 0%, 
        rgba(0, 255, 255, 0.05) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: -1;
    transform: translate(1px, 1px);
    filter: blur(0.5px);
}

.main-title::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.1) 0%,
        rgba(0, 255, 150, 0.05) 50%,
        rgba(0, 255, 0, 0.1) 100%);
    border-radius: 12px;
    z-index: -2;
    filter: blur(20px);
    opacity: 0.6;
}

@keyframes subtle-glow {
    0%, 100% {
        filter: drop-shadow(0 2px 8px rgba(0, 255, 0, 0.3))
                drop-shadow(0 0 20px rgba(0, 255, 0, 0.1));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 4px 16px rgba(0, 255, 0, 0.4))
                drop-shadow(0 0 30px rgba(0, 255, 0, 0.15));
        transform: scale(1.01);
    }
}

/* 移除故障动画，改为更现代的效果 */

/* 副标题样式 */
.subtitle {
    margin-top: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--secondary-color);
    min-height: 2rem;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 主内容区域 */
.cyber-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 终端窗口样式 */
.terminal-window {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    overflow: hidden;
}

.terminal-header {
    background: rgba(0, 255, 0, 0.2);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
}

.terminal-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* 滚动控制按钮样式 */
.terminal-scroll-controls {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.scroll-control {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    font-family: var(--font-cyber);
}

.scroll-control:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
    transform: translateY(-1px);
}

.scroll-control:active {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(0, 255, 0, 0.6);
}

.scroll-control.paused {
    background: rgba(255, 165, 0, 0.1);
    border-color: #ffa500;
    color: #ffa500;
}

.scroll-control.paused:hover {
    background: rgba(255, 165, 0, 0.2);
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.4);
}

.pause-icon, .play-icon {
    font-size: 0.9rem;
    line-height: 1;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.pause-icon {
    letter-spacing: 1px;
}

.play-icon {
    margin-left: 1px; /* 调整播放三角形的视觉居中 */
}

.terminal-body {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    min-height: 200px;
    max-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* 赛博朋克风格滚动条 - 通用样式 */
.terminal-body::-webkit-scrollbar,
.terminal-history::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track,
.terminal-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.terminal-body::-webkit-scrollbar-thumb,
.terminal-history::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), #66ff66);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
    position: relative;
}

.terminal-body::-webkit-scrollbar-thumb:hover,
.terminal-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #66ff66, var(--primary-color));
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.5);
    animation: scrollbar-glow 0.3s ease-out;
}

.terminal-body::-webkit-scrollbar-corner,
.terminal-history::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

/* 滚动条发光动画 */
@keyframes scrollbar-glow {
    0% { 
        box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 0 16px rgba(0, 255, 0, 0.6);
        filter: brightness(1.3);
    }
    100% { 
        box-shadow: 0 0 12px rgba(0, 255, 0, 0.5);
        filter: brightness(1.1);
    }
}

/* Firefox滚动条样式 */
.terminal-body,
.terminal-history {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.terminal-history {
    flex: 1;
    overflow-y: auto;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: max(1rem, 16px); /* 确保最小16px防止移动端缩放 */
    flex: 1;
    margin-left: 0.5rem;
    caret-color: var(--primary-color);
    /* 移动端样式重置 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-border-radius: 0;
    border-radius: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
    /* 防止iOS设备的样式干扰和缩放 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: text;
    user-select: text;
    /* 防止移动端输入时页面缩放 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.terminal-input::placeholder {
    color: rgba(0, 255, 0, 0.5);
}

/* 额外的移动端输入框状态重置 */
.terminal-input:focus,
.terminal-input:active {
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    background: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--primary-color);
}

.command {
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

.response {
    color: var(--text-secondary);
    margin-left: 1rem;
}

.file-secret {
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-secret:hover {
    text-shadow: 0 0 10px var(--accent-color);
    transform: scale(1.1);
}

.current-line {
    animation: pulse 1s infinite alternate;
}

.cursor-terminal {
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 网格布局 */
.cyber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    /* margin-top: 2rem; */
}

.grid-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 20, 20, 0.8));
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 200px;
}

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

.grid-item::before {
    content: attr(data-hover);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.5rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    font-weight: 700;
    font-size: 0.8rem;
}

.grid-item:hover::before {
    transform: translateY(0);
}

.grid-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(0, 30, 0, 0.9), rgba(0, 40, 40, 0.8));
}

.grid-item:hover::after {
    left: 100%;
}

.grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    justify-content: space-between;
}

/* 状态指示器 */
.status-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: radial-gradient(circle at 30% 30%, #66ff66, var(--primary-color));
    box-shadow: 0 0 15px var(--primary-color), inset 2px 2px 4px rgba(255, 255, 255, 0.3);
    animation: pulse-indicator 2s infinite;
    border: 2px solid rgba(0, 255, 0, 0.3);
}

.status-indicator.online::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: inner-pulse 1.5s infinite alternate;
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 50%;
    animation: outer-ring 3s infinite;
}

@keyframes pulse-indicator {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px var(--primary-color), inset 2px 2px 4px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 25px var(--primary-color), inset 2px 2px 4px rgba(255, 255, 255, 0.5);
    }
}

@keyframes inner-pulse {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 面板脉冲动画和状态样式 */
@keyframes panel-pulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}

.status-indicator.matrix {
    background: radial-gradient(circle at 30% 30%, #66ff99, var(--primary-color));
    box-shadow: 0 0 20px var(--primary-color), inset 2px 2px 4px rgba(255, 255, 255, 0.4);
    animation: matrix-pulse 1.5s infinite alternate;
}

.status-indicator.love {
    background: radial-gradient(circle at 30% 30%, #ff69b4, var(--accent-color));
    box-shadow: 0 0 20px var(--accent-color), inset 2px 2px 4px rgba(255, 255, 255, 0.4);
    animation: love-pulse 0.8s infinite alternate;
}

.status-indicator.hacking {
    background: radial-gradient(circle at 30% 30%, #ff4444, #cc0000);
    box-shadow: 0 0 25px #ff4444, inset 2px 2px 4px rgba(255, 255, 255, 0.3);
    animation: hack-pulse 0.3s infinite;
}

.status-indicator.denied {
    background: radial-gradient(circle at 30% 30%, #ff0000, #800000);
    box-shadow: 0 0 30px #ff0000, inset 2px 2px 4px rgba(255, 255, 255, 0.2);
    animation: error-flash 0.5s infinite alternate;
}

@keyframes matrix-pulse {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(60deg); }
}

@keyframes love-pulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

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

@keyframes error-flash {
    0% { box-shadow: 0 0 30px #ff0000, inset 2px 2px 4px rgba(255, 255, 255, 0.2); }
    100% { box-shadow: 0 0 50px #ff0000, inset 2px 2px 4px rgba(255, 255, 255, 0.4); }
}

/* 系统状态样式 */
.system-stats {
    width: 100%;
    margin-top: 0.8rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
}

.stat-label {
    color: var(--text-secondary);
    min-width: 30px;
    font-family: 'Courier New', monospace;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #66ff66);
    border-radius: 3px;
    transition: width 2s ease;
    position: relative;
    animation: progress-flow 2s infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 1.5s infinite;
}

.stat-value {
    color: var(--primary-color);
    font-weight: bold;
    min-width: 35px;
    text-align: right;
}

.mini-chart {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

@keyframes progress-flow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 网络状态样式 */
.network-stats {
    width: 100%;
    margin-top: 0.8rem;
}

.bandwidth-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.speed-indicator {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.speed-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-shadow: 0 0 8px var(--secondary-color);
}

.speed-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.connection-type {
    font-size: 0.7rem;
    color: var(--secondary-color);
    opacity: 0.8;
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.ping-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.ping-value {
    color: var(--primary-color);
    font-weight: bold;
}

/* 数据流状态样式 */
.data-stats {
    width: 100%;
    margin-top: 0.8rem;
}

.data-metrics {
    display: flex;
    justify-content: space-around;
    margin-bottom: 0.8rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.metric-value {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 4px var(--primary-color);
}

.throughput {
    margin-top: 0.8rem;
}

.throughput-bar {
    height: 8px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 0, 0.2);
    margin-bottom: 0.3rem;
}

.throughput-fill {
    height: 100%;
    width: 89%;
    background: linear-gradient(90deg, var(--primary-color), #66ff99, var(--primary-color));
    animation: throughput-pulse 2s infinite;
    background-size: 200% 100%;
}

.throughput-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

@keyframes throughput-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 神秘模块雷达样式 */
.mystery-stats {
    width: 100%;
    margin-top: 0.8rem;
}

.radar-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 0.8rem auto;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.1), transparent 70%);
    border-radius: 50%;
}

.radar-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.radar-circle {
    position: absolute;
    border: 1px solid rgba(255, 0, 128, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radar-circle:nth-child(1) {
    width: 25%;
    height: 25%;
}

.radar-circle:nth-child(2) {
    width: 50%;
    height: 50%;
}

.radar-circle:nth-child(3) {
    width: 75%;
    height: 75%;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: conic-gradient(from 0deg, transparent 60%, rgba(255, 0, 128, 0.8), transparent 120%);
    border-radius: 50%;
    animation: radar-rotation 3s linear infinite;
}

.radar-blip {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
    animation: radar-blink 2s infinite;
}

.radar-blip-1 {
    top: 30%;
    left: 60%;
    animation-delay: 0s;
}

.radar-blip-2 {
    top: 65%;
    left: 35%;
    animation-delay: 0.7s;
}

.radar-blip-3 {
    top: 45%;
    left: 20%;
    animation-delay: 1.4s;
}

.detection-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
}

.detection-count {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: bold;
}

.scan-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
    animation: scan-blink 1.5s infinite;
}

@keyframes radar-rotation {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes radar-blink {
    0%, 80% { opacity: 0.3; }
    90% { opacity: 1; }
    100% { opacity: 0.3; }
}

@keyframes scan-blink {
    0%, 70% { opacity: 1; }
    85% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 网络信号条 */
.network-bars {
    display: flex;
    gap: 4px;
    align-items: end;
    padding: 8px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    position: relative;
}

.network-bars::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 1px;
    box-shadow: 0 0 4px var(--secondary-color);
}

.network-bars span {
    width: 5px;
    background: linear-gradient(to top, var(--secondary-color), #66ffff);
    animation: network-activity 1.5s infinite;
    border-radius: 2px 2px 0 0;
    position: relative;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.network-bars span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.network-bars span:nth-child(1) { height: 10px; animation-delay: 0s; }
.network-bars span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.network-bars span:nth-child(3) { height: 22px; animation-delay: 0.4s; }
.network-bars span:nth-child(4) { height: 28px; animation-delay: 0.6s; }

@keyframes network-activity {
    0%, 60% { 
        opacity: 0.4; 
        transform: scaleY(0.7);
    }
    30% { 
        opacity: 1; 
        transform: scaleY(1);
        filter: brightness(1.3);
    }
}

/* 数据流 */
.data-stream {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    padding: 12px;
    background: linear-gradient(45deg, rgba(0, 255, 0, 0.03), rgba(0, 255, 0, 0.08));
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 0, 0.15);
    position: relative;
    min-height: 40px;
}

.data-stream::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px dashed rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    animation: border-flow 4s infinite linear;
}

.data-stream span {
    animation: data-flow 1s infinite linear;
    padding: 2px 4px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid rgba(0, 255, 0, 0.2);
    text-shadow: 0 0 4px var(--primary-color);
    position: relative;
}

.data-stream span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: data-shimmer 2s infinite;
    border-radius: 3px;
}

.data-stream span:nth-child(1) { animation-delay: 0s; }
.data-stream span:nth-child(2) { animation-delay: 0.25s; }
.data-stream span:nth-child(3) { animation-delay: 0.5s; }
.data-stream span:nth-child(4) { animation-delay: 0.75s; }

@keyframes data-flow {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1) translateY(0);
        filter: brightness(0.8);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05) translateY(-1px);
        filter: brightness(1.2);
    }
}

@keyframes data-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 网络信号条增强动画 */
.network-bars.enhanced span {
    animation: network-boost 0.5s ease-out, network-activity 1.5s infinite;
    filter: brightness(1.3) saturate(1.2);
}

@keyframes network-boost {
    0% { transform: scaleY(0.7); }
    50% { transform: scaleY(1.3); }
    100% { transform: scaleY(1); }
}

/* 数据流增强效果 */
.data-stream.enhanced span {
    animation: data-surge 0.8s ease-out, data-flow 1s infinite linear;
    filter: brightness(1.4) drop-shadow(0 0 8px var(--primary-color));
}

@keyframes data-surge {
    0% { transform: scale(0.8) translateY(10px); opacity: 0.5; }
    50% { transform: scale(1.2) translateY(-5px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* 神秘元素 */
.mystery-icon {
    font-size: 3rem;
    color: var(--accent-color);
    animation: mystery-glow 4s infinite;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px var(--accent-color);
}

.mystery-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 0, 128, 0.3);
    border-radius: 50%;
    animation: mystery-ring 3s infinite;
}

.mystery-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(255, 0, 128, 0.5);
    border-radius: 50%;
    animation: mystery-ring 2s infinite reverse;
}

@keyframes mystery-glow {
    0%, 100% { 
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px var(--accent-color),
            0 0 30px var(--accent-color);
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(90deg);
        filter: hue-rotate(45deg);
    }
    50% { 
        text-shadow: 
            0 0 15px var(--accent-color),
            0 0 30px var(--accent-color),
            0 0 45px var(--accent-color);
        transform: scale(1.2) rotate(180deg);
        filter: hue-rotate(90deg);
    }
    75% {
        transform: scale(1.1) rotate(270deg);
        filter: hue-rotate(135deg);
    }
}

@keyframes mystery-ring {
    0% { 
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        opacity: 0.7;
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.8) rotate(360deg);
        opacity: 0.3;
    }
}

.secret-item {
    border-color: var(--accent-color);
}

.secret-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

/* 页脚样式 */
.cyber-footer {
    border-top: 1px solid var(--primary-color);
    padding-top: 1rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.system-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.separator {
    color: var(--primary-color);
}

.easter-egg-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    animation: hint-fade 3s infinite alternate;
}

@keyframes hint-fade {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

/* 粒子容器 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .cyber-main {
        grid-template-columns: 1fr;
    }
    
    .cyber-grid {
        grid-template-columns: 1fr;
    }
    
    .grid-item {
        min-height: 180px;
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .system-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 移动端终端样式修复 */
    .terminal-header {
        padding: 0.4rem 0.8rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.5rem;
        min-height: 32px;
    }
    
    .terminal-title {
        font-size: 0.8rem;
        flex: 1;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0; /* 允许flex收缩 */
    }
    
    .terminal-scroll-controls {
        display: flex;
        flex-shrink: 0;
        gap: 0.2rem;
        align-items: center;
    }
    
    .scroll-control {
        min-width: 28px;
        height: 22px;
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .pause-icon, .play-icon {
        font-size: 0.8rem;
    }
    
    /* 移动端输入框修复 */
    .terminal-input {
        font-size: max(1rem, 16px); /* 确保最小16px防止移动端缩放 */
        /* 禁用移动端输入框样式 */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0;
        /* 防止缩放但保持功能性 */
        transform-origin: left top;
        zoom: 1;
        /* 确保事件处理正常 */
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    /* 防止输入框在移动端出现奇怪的样式 */
    .terminal-input:focus {
        outline: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        font-size: 0.8rem !important; /* 保持一致字体大小 */
        /* 防止页面缩放但保持输入功能 */
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .terminal-body {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .terminal-body {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
    
    .grid-item {
        padding: 1rem;
        min-height: 160px;
    }
    
    .stat-item {
        font-size: 0.7rem;
    }
    
    .speed-value {
        font-size: 1.2rem;
    }
    
    /* 超小屏幕的终端优化 */
    .terminal-header {
        padding: 0.3rem 0.6rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.3rem;
        min-height: 28px;
    }
    
    .terminal-title {
        font-size: 0.7rem;
        flex: 1;
        min-width: 0; /* 允许flex item缩小 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .terminal-scroll-controls {
        display: flex;
        flex-shrink: 0;
        gap: 0.15rem;
        align-items: center;
    }
    
    .scroll-control {
        min-width: 24px;
        height: 18px;
        padding: 0.1rem 0.2rem;
        font-size: 0.65rem;
    }
    
    .pause-icon, .play-icon {
        font-size: 0.65rem;
        line-height: 1;
    }
    
    .terminal-input {
        font-size: max(1rem, 16px); /* 确保最小16px防止移动端缩放 */
    }
    
    .terminal-input-line {
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    
    .prompt {
        font-size: 0.7rem;
    }
}

/* 极小屏幕优化 (320px及以下) */
@media (max-width: 320px) {
    .terminal-header {
        padding: 0.2rem 0.4rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.2rem;
        min-height: 24px;
    }
    
    .terminal-title {
        font-size: 0.65rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .terminal-scroll-controls {
        display: flex;
        flex-shrink: 0;
        gap: 0.1rem;
        align-items: center;
    }
    
    .scroll-control {
        min-width: 22px;
        height: 16px;
        padding: 0.05rem 0.1rem;
        font-size: 0.6rem;
    }
    
    .pause-icon, .play-icon {
        font-size: 0.6rem;
    }
}

/* 特殊效果类 */
.konami-activated {
    animation: rainbow 2s infinite linear;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.matrix-rain {
    position: absolute;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    animation: matrix-fall 3s linear infinite;
    pointer-events: none;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 赛博朋克2077风格故障效果 */
.cyber-glitch {
    position: relative;
    display: inline-block;
}

.cyber-glitch::before,
.cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.cyber-glitch::before {
    color: #ff0040;
    z-index: -1;
    clip-path: inset(0);
}

.cyber-glitch::after {
    color: #00ffff;
    z-index: -2;
    clip-path: inset(0);
}

/* 2077风格的主故障动画 */
.cyber-glitch.glitch-active {
    animation: cp2077-main-glitch 0.4s ease-out;
}

.cyber-glitch.glitch-active::before {
    animation: cp2077-red-shift 0.4s ease-out;
}

.cyber-glitch.glitch-active::after {
    animation: cp2077-cyan-shift 0.4s ease-out;
}

@keyframes cp2077-main-glitch {
    0% { transform: translate(0); filter: none; }
    10% { transform: translate(-2px, 1px) skew(-0.5deg); filter: contrast(120%) brightness(110%); }
    20% { transform: translate(1px, -1px) skew(0.3deg); filter: contrast(80%) brightness(90%); }
    30% { transform: translate(-1px, 2px) skew(-0.2deg); filter: contrast(150%) brightness(120%); }
    40% { transform: translate(2px, -2px) skew(0.4deg); filter: contrast(70%) brightness(80%); }
    50% { transform: translate(-3px, 1px) skew(-0.1deg); filter: contrast(130%) brightness(115%); }
    60% { transform: translate(1px, -3px) skew(0.2deg); filter: contrast(90%) brightness(95%); }
    70% { transform: translate(-2px, 2px) skew(-0.3deg); filter: contrast(140%) brightness(105%); }
    80% { transform: translate(3px, -1px) skew(0.1deg); filter: contrast(110%) brightness(100%); }
    90% { transform: translate(-1px, 1px) skew(0deg); filter: contrast(100%) brightness(100%); }
    100% { transform: translate(0); filter: none; }
}

@keyframes cp2077-red-shift {
    0% { transform: translate(0); opacity: 0; clip-path: inset(0); }
    15% { transform: translate(-4px, 0); opacity: 0.8; clip-path: inset(0 0 80% 0); }
    25% { transform: translate(-2px, 0); opacity: 0.6; clip-path: inset(20% 0 60% 0); }
    35% { transform: translate(-3px, 0); opacity: 0.9; clip-path: inset(40% 0 40% 0); }
    45% { transform: translate(-1px, 0); opacity: 0.4; clip-path: inset(60% 0 20% 0); }
    55% { transform: translate(-2px, 0); opacity: 0.7; clip-path: inset(10% 0 70% 0); }
    65% { transform: translate(-4px, 0); opacity: 0.5; clip-path: inset(30% 0 50% 0); }
    75% { transform: translate(-1px, 0); opacity: 0.3; clip-path: inset(70% 0 10% 0); }
    85% { transform: translate(-2px, 0); opacity: 0.2; clip-path: inset(50% 0 30% 0); }
    100% { transform: translate(0); opacity: 0; clip-path: inset(0); }
}

@keyframes cp2077-cyan-shift {
    0% { transform: translate(0); opacity: 0; clip-path: inset(0); }
    12% { transform: translate(3px, 0); opacity: 0.7; clip-path: inset(80% 0 0% 0); }
    22% { transform: translate(2px, 0); opacity: 0.5; clip-path: inset(60% 0 20% 0); }
    32% { transform: translate(4px, 0); opacity: 0.8; clip-path: inset(40% 0 40% 0); }
    42% { transform: translate(1px, 0); opacity: 0.4; clip-path: inset(20% 0 60% 0); }
    52% { transform: translate(3px, 0); opacity: 0.6; clip-path: inset(70% 0 10% 0); }
    62% { transform: translate(2px, 0); opacity: 0.3; clip-path: inset(50% 0 30% 0); }
    72% { transform: translate(4px, 0); opacity: 0.5; clip-path: inset(30% 0 50% 0); }
    82% { transform: translate(1px, 0); opacity: 0.2; clip-path: inset(10% 0 70% 0); }
    100% { transform: translate(0); opacity: 0; clip-path: inset(0); }
}

/* 数字撕裂效果 */
.digital-tear {
    position: relative;
}

.digital-tear.tear-active {
    animation: digital-distortion 0.6s ease-out;
}

@keyframes digital-distortion {
    0% { transform: scaleY(1); filter: none; }
    10% { transform: scaleY(0.95) scaleX(1.02); filter: brightness(120%) contrast(130%); }
    20% { transform: scaleY(1.08) scaleX(0.98); filter: brightness(80%) contrast(150%); }
    30% { transform: scaleY(0.92) scaleX(1.05); filter: brightness(110%) contrast(90%); }
    40% { transform: scaleY(1.12) scaleX(0.96); filter: brightness(90%) contrast(140%); }
    50% { transform: scaleY(0.88) scaleX(1.08); filter: brightness(130%) contrast(80%); }
    60% { transform: scaleY(1.15) scaleX(0.93); filter: brightness(70%) contrast(160%); }
    70% { transform: scaleY(0.85) scaleX(1.12); filter: brightness(115%) contrast(85%); }
    80% { transform: scaleY(1.05) scaleX(0.97); filter: brightness(95%) contrast(110%); }
    90% { transform: scaleY(0.98) scaleX(1.01); filter: brightness(105%) contrast(105%); }
    100% { transform: scaleY(1) scaleX(1); filter: none; }
}

/* RGB分离故障 */
.rgb-split {
    position: relative;
    display: inline-block;
}

.rgb-split.split-active {
    animation: rgb-separation 0.5s ease-out;
}

.rgb-split.split-active::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ff0040;
    mix-blend-mode: screen;
    animation: rgb-red-channel 0.5s ease-out;
}

.rgb-split.split-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #00ffff;
    mix-blend-mode: screen;
    animation: rgb-cyan-channel 0.5s ease-out;
}

@keyframes rgb-separation {
    0% { filter: none; }
    100% { filter: none; }
}

@keyframes rgb-red-channel {
    0%, 100% { transform: translate(0); opacity: 0; }
    20% { transform: translate(-3px, 1px); opacity: 0.8; }
    40% { transform: translate(-5px, -1px); opacity: 0.6; }
    60% { transform: translate(-2px, 2px); opacity: 0.9; }
    80% { transform: translate(-4px, 0px); opacity: 0.4; }
}

@keyframes rgb-cyan-channel {
    0%, 100% { transform: translate(0); opacity: 0; }
    15% { transform: translate(3px, -1px); opacity: 0.7; }
    35% { transform: translate(5px, 1px); opacity: 0.5; }
    55% { transform: translate(2px, -2px); opacity: 0.8; }
    75% { transform: translate(4px, 0px); opacity: 0.3; }
}

/* 静电噪音效果 */
.static-noise {
    position: relative;
}

.static-noise.noise-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 64, 0.1) 2px,
            rgba(255, 0, 64, 0.1) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.05) 2px,
            rgba(0, 255, 255, 0.05) 4px
        );
    animation: static-flicker 0.3s steps(10) infinite;
    pointer-events: none;
}

@keyframes static-flicker {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 扫描线故障 */
.scan-glitch {
    position: relative;
}

.scan-glitch.scan-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(0, 255, 255, 0.8) 50%,
        transparent 60%
    );
    animation: scan-line-move 0.8s ease-out;
    pointer-events: none;
}

@keyframes scan-line-move {
    0% { transform: translateY(-100%); opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* 终端动画效果 */
.terminal-line.auto-scroll {
    animation: terminal-appear 0.5s ease-out;
}

@keyframes terminal-appear {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

.terminal-line.error {
    color: var(--accent-color);
}

.terminal-line.warning {
    color: var(--warning-color);
}

.terminal-line.info {
    color: var(--secondary-color);
}

.terminal-line.success {
    color: var(--primary-color);
}

/* 彩蛋弹窗样式 */
.easter-egg-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 20, 0.95));
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: 2rem;
    z-index: 10000;
    box-shadow: 
        0 0 50px rgba(255, 0, 128, 0.5),
        inset 0 0 20px rgba(255, 0, 128, 0.1);
    text-align: center;
    min-width: 300px;
    animation: popup-appear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popup-appear {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.3) rotate(10deg); 
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
    }
}

.easter-egg-popup h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--accent-color);
}

.easter-egg-popup p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.easter-egg-popup button {
    background: linear-gradient(45deg, var(--accent-color), #ff6b9d);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.easter-egg-popup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.4);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(5px);
}