/* 基础变量和重置 */
:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-purple: #b026ff;
    --neon-yellow: #fff01f;
    --dark-bg: #050508;
    --glass-bg: rgba(10, 10, 20, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Noto Sans SC', 'Orbitron', sans-serif;
    background: var(--dark-bg);
    color: #fff;
    position: relative;
    transition: all 0.8s ease;
}

/* 锁屏层 */
#lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(30px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#lock-screen.unlocked {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.lock-container {
    width: 90%;
    max-width: 500px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    animation: lockFloat 3s ease-in-out infinite;
}

.lock-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--neon-cyan);
    stroke-width: 2;
    filter: drop-shadow(0 0 20px var(--neon-cyan));
}

.lock-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.lock-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

/* 密码显示 */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.pin-dot.filled {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    transform: scale(1.2);
}

.pin-dot.error {
    background: #ff0000;
    border-color: #ff0000;
    animation: shake 0.5s;
}

.pin-dot.success {
    background: #00ff00;
    border-color: #00ff00;
    box-shadow: 0 0 20px #00ff00;
}

/* 键盘 */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 320px;
    margin: 0 auto;
}

.key {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.key:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.key-backspace, .key-clear {
    background: rgba(255, 0, 255, 0.1);
    border-color: rgba(255, 0, 255, 0.3);
    font-size: 1.2em;
}

.lock-message {
    text-align: center;
    margin-top: 20px;
    height: 24px;
    font-size: 0.9em;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lock-message.error {
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

/* 主容器 */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 100px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    perspective: 1000px;
}

/* 标题区 */
.glitch-wrapper {
    text-align: center;
    margin-bottom: 30px;
    animation: float 6s ease-in-out infinite;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5em;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    letter-spacing: 4px;
}

.subtitle {
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    letter-spacing: 8px;
    margin-top: 15px;
    opacity: 0.8;
    text-shadow: 0 0 10px var(--neon-cyan);
    animation: pulse 2s infinite;
}

/* 切换按钮 */
.mode-toggle-container {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}

.mode-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.mode-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.mode-icon {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.mode-toggle-btn:hover .mode-icon {
    transform: rotate(180deg);
}

/* 区块样式 */
.cyber-section {
    position: relative;
    width: 100%;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    overflow: hidden;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-cyan);
    transition: all 0.3s;
}

.corner-tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner-tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner-bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner-br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.section-icon {
    font-size: 2em;
    margin-right: 15px;
    filter: drop-shadow(0 0 10px currentColor);
    animation: iconFloat 3s ease-in-out infinite;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* 按钮网格 */
.neon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.neon-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.neon-btn svg {
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.neon-btn.pink { border-color: rgba(255, 0, 255, 0.3); }
.neon-btn.yellow { border-color: rgba(255, 240, 31, 0.3); }

.cyber-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* 底部状态栏 */
#cyber-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 9999;
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    letter-spacing: 1px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.status-label {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.latency-value {
    color: #fff;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
}

.ping-bar {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 20px;
}

.ping-segment {
    width: 4px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.ping-segment.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.system-time {
    color: var(--neon-pink);
    font-weight: 700;
    text-shadow: 0 0 5px var(--neon-pink);
}

/* 背景效果 */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%);
    background-size: 100% 4px;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.3;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

.neon-orbs {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: orbFloat 15s infinite ease-in-out;
}

.orb-1 { width: 300px; height: 300px; background: var(--neon-pink); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--neon-cyan); bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: var(--neon-purple); top: 40%; left: 60%; animation-delay: -10s; }

/* 响应式 */
@media (max-width: 768px) {
    h1 { font-size: 2.2em; letter-spacing: 2px; }
    .subtitle { font-size: 0.9em; letter-spacing: 4px; }
    .neon-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .neon-btn { padding: 20px 10px; font-size: 12px; }
    .neon-btn svg { width: 24px; height: 24px; }
    .cyber-section { padding: 20px; }
    #cyber-bar { padding: 0 15px; font-size: 11px; height: 50px; }
    .lock-container { padding: 30px 20px; }
    .lock-title { font-size: 1.5em; }
    .key { font-size: 1.5em; }
    .mode-toggle-btn { padding: 10px 20px; font-size: 0.8em; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { 
    background: var(--neon-cyan); 
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-cyan);
}
