/* static/css/login.css — Matrix Hacker Login Theme */

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Vazir', monospace;
    background: #000;
    color: #0f0;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* پس‌زمینه ماتریکس */
.matrix-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, #000 0%, #001a00 100%);
    opacity: 0.9;
    z-index: 1;
}

.matrix-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(0,255,0,0.03) 50px, rgba(0,255,0,0.03) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(0,255,0,0.03) 50px, rgba(0,255,0,0.03) 100px);
    animation: rain 8s linear infinite;
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: 0 1000px; }
}

/* اسکن لاین */
.scanline {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,255,0,0.05), transparent);
    animation: scan 6s linear infinite;
    z-index: 2;
    pointer-events: none;
}
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* نویز */
.noise {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://i.imgur.com/9X2OXsI.png');
    opacity: 0.05;
    z-index: 3;
    pointer-events: none;
    animation: noise 0.2s steps(10) infinite;
}
@keyframes noise { from { background-position: 0 0; } to { background-position: 100% 100%; } }

/* کانتینر اصلی */
.login-container {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* باکس لاگین */
.login-box {
    width: 100%;
    max-width: 420px;
    background: rgba(0, 20, 0, 0.85);
    border: 1px solid #0f0;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow:
        0 0 30px #0f0,
        inset 0 0 20px rgba(0,255,0,0.1);
    backdrop-filter: blur(10px);
    animation: pulse 4s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px #0f0, inset 0 0 20px rgba(0,255,0,0.1); }
    50% { box-shadow: 0 0 50px #0f0, inset 0 0 30px rgba(0,255,0,0.2); }
}

/* گلیچ لوگو */
.header-glitch {
    text-align: center;
    margin-bottom: 30px;
}
.glitch {
    font-size: 3.5rem;
    font-weight: 900;
    color: #0f0;
    text-shadow:
        0 0 10px #0f0,
        3px 3px 0 #f00,
        -3px -3px 0 #00f;
    animation: glitch 3s infinite;
}
@keyframes glitch {
    0%, 100% { text-shadow: 3px 3px 0 #f00, -3px -3px 0 #00f; }
    20% { text-shadow: -3px -3px 0 #f00, 3px 3px 0 #00f; }
    40% { text-shadow: 5px 0 0 #0f0; }
    60% { text-shadow: -5px 0 0 #0f0; }
}
.tagline {
    color: #0a0;
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-top: 10px;
}

/* اینپوت‌ها */
.input-group {
    position: relative;
    margin: 25px 0;
}
.input-group input {
    width: 100%;
    padding: 14px 14px 14px 50px;
    background: rgba(0,10,0,0.8);
    border: 1px solid #0f0;
    border-radius: 8px;
    color: #0f0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(0,255,0,0.3);
}
.input-group input:focus {
    border-color: #0f0;
    box-shadow: 0 0 25px #0f0;
    background: rgba(0,30,0,0.8);
}
.input-group label {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    color: #0a0;
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s;
}
.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -10px;
    right: 15px;
    font-size: 0.8rem;
    background: #000;
    padding: 0 8px;
    color: #0f0;
}
.icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f0;
    font-size: 1.2rem;
    z-index: 2;
}

/* دکمه ورود */
.login-btn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.4s;
    box-shadow: 0 0 20px rgba(0,255,0,0.5);
}
.login-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 40px #0f0;
}
.btn-glitch {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,0,0.3), transparent);
    transition: 0.5s;
}
.login-btn:hover .btn-glitch {
    left: 100%;
}

/* پیام خطا */
.error-message {
    color: #f00;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    animation: glitch 2s infinite;
}

/* ترمینال تایپ */
.typing-terminal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    color: #0f0;
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 10;
}
.success { color: #0f0; font-weight: bold; }
.blink {
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}