/* 黑客终端登录页独立样式 - 精简版 */
:root {
    --neon-green: #0f0;
    --dark-bg: #050505;
    --dim-green: #003300;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
body {
    background-color: var(--dark-bg);
    color: var(--neon-green);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: crosshair;
}
/* CRT扫描线动画 */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 50;
    animation: scrollScanlines 10s linear infinite;
}
/* CRT屏幕闪烁滤镜 */
.crt-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.02);
    opacity: 0;
    z-index: 49;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}
/* 矩阵数字雨画布 */
#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.6;
}
/* 登录弹窗容器 */
.login-container {
    position: relative;
    z-index: 10;
    width: 400px;
    max-width: 90%;
    padding: 2rem;
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3), inset 0 0 10px rgba(0, 255, 0, 0.1);
    background: rgba(0, 10, 0, 0.95);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.login-container.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}
/* 四角装饰边框 */
.corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--neon-green);
}
.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }
/* 故障错位标题文字 */
.glitch-text {
    position: relative;
    color: var(--neon-green);
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px var(--dim-green);
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    opacity: 0.8;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
/* 输入框组 */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.input-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: var(--neon-green);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    padding: 10px 5px;
    transition: all 0.3s ease;
}
.input-field:focus {
    outline: none;
    border-bottom-color: var(--neon-green);
    box-shadow: 0 4px 4px -2px rgba(0, 255, 0, 0.2);
}
.input-label {
    position: absolute;
    top: 10px;
    left: 5px;
    color: #666;
    pointer-events: none;
    transition: 0.3s ease all;
    font-size: 0.9rem;
}
.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label {
    top: -20px;
    font-size: 0.75rem;
    color: var(--neon-green);
}
/* 登录按钮 */
.hack-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}
.hack-btn:hover, .hack-btn:active {
    background: var(--neon-green);
    color: black;
    box-shadow: 0 0 20px var(--neon-green);
}
/* 底部提示文字 */
.warning-tip {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.6rem;
    color: #0dcff1;
}
/* 动画关键帧 */
@keyframes scrollScanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}
@keyframes flicker {
    0% { opacity: 0.02; }
    5% { opacity: 0.05; }
    10% { opacity: 0.02; }
    15% { opacity: 0.06; }
    20% { opacity: 0.02; }
    50% { opacity: 0.02; }
    55% { opacity: 0.05; }
    60% { opacity: 0.02; }
    100% { opacity: 0.02; }
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); transform: skew(0.5deg); }
    20% { clip: rect(80px, 9999px, 100px, 0); transform: skew(-0.5deg); }
    40% { clip: rect(20px, 9999px, 60px, 0); transform: skew(0.2deg); }
    60% { clip: rect(90px, 9999px, 110px, 0); transform: skew(-0.2deg); }
    80% { clip: rect(40px, 9999px, 50px, 0); transform: skew(0.1deg); }
    100% { clip: rect(60px, 9999px, 80px, 0); transform: skew(0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 80px, 0); transform: skew(0); }
    20% { clip: rect(10px, 9999px, 30px, 0); transform: skew(0.5deg); }
    40% { clip: rect(90px, 9999px, 110px, 0); transform: skew(-0.2deg); }
    60% { clip: rect(20px, 9999px, 60px, 0); transform: skew(0.2deg); }
    80% { clip: rect(80px, 9999px, 100px, 0); transform: skew(-0.5deg); }
    100% { clip: rect(40px, 9999px, 50px, 0); transform: skew(0.1deg); }
}
/* 响应式适配 */
@media screen and (max-width: 768px) {
    .login-container {
        width: 90%;
        padding: 1.5rem;
    }
    .glitch-text {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    .input-field {
        font-size: 0.9rem;
    }
    .hack-btn {
        font-size: 0.9rem;
        padding: 10px;
    }
}
@media screen and (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 1rem;
    }
    .glitch-text {
        font-size: 1.2rem;
    }
    .corner {
        width: 8px;
        height: 8px;
    }
}
/* 手机横屏适配 */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
    .login-container {
        transform: scale(0.85);
    }
    .login-container.visible {
        transform: scale(0.85) translateY(0);
    }
}