/* HARD RESET */
* {
    all: unset;
    display: revert;
    box-sizing: border-box;
}

/* ============================================================
   GLOBAL PAGE
============================================================ */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    color: #c8ffc8;
    font-family: "Share Tech Mono", Consolas, monospace;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    -webkit-text-size-adjust: none;
}

/* CRT SCANLINES */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,255,102,0.05) 0px,
        rgba(0,255,102,0.05) 2px,
        transparent 2px,
        transparent 4px
    );
    z-index: 999;
    mix-blend-mode: overlay;
}

/* MATRIX RAIN CANVAS */
#matrixRain {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1;
    pointer-events: none;
}

/* GLITCH INTRO */
.glitch-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #00ff66;
    opacity: 0;
    animation: glitchFlash 1.2s ease-out;
    z-index: 50;
}

@keyframes glitchFlash {
    0% { opacity: 1; }
    20% { opacity: 0; }
    30% { opacity: 0.4; }
    40% { opacity: 0; }
    60% { opacity: 0.2; }
    100% { opacity: 0; }
}

/* ============================================================
   LOGIN CONTAINER
============================================================ */

.login-container {
    position: relative;
    z-index: 100;
    width: 90%;
    max-width: 380px;
    text-align: center;
    margin: 0;
    animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.96); }
    60% { opacity: 1; transform: translateY(0) scale(1.02); }
    100% { transform: scale(1); }
}

/* LOGO PULSE */
.login-logo {
    width: 170px;
    margin-bottom: 22px;
    filter: drop-shadow(0 0 12px #00ff66);
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0% { filter: drop-shadow(0 0 6px #00ff66); }
    50% { filter: drop-shadow(0 0 22px #00ff66); }
    100% { filter: drop-shadow(0 0 6px #00ff66); }
}

/* SUBTITLE TYPING CURSOR */
.login-subtitle {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #00ff66;
    text-shadow: 0 0 8px #00ff66;
    animation: subtitleGlow 2.5s infinite alternate ease-in-out, cursorBlink 0.8s infinite;
    border-right: 2px solid #00ff66;
    padding-right: 6px;
}

@keyframes subtitleGlow {
    from { text-shadow: 0 0 4px #00ff66; }
    to { text-shadow: 0 0 14px #00ff66; }
}

@keyframes cursorBlink {
    0%, 49% { border-color: #00ff66; }
    50%, 100% { border-color: transparent; }
}

/* FORM */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* INPUTS — 1.5× WIDE + NEON SWEEP */
.login-input {
    padding: 12px 14px;
    font-size: 1.1rem;
    border-radius: 4px;
    border: 1px solid rgba(0,255,102,0.4);
    background: #000;
    color: #c8ffc8;
    box-shadow: 0 0 6px rgba(0,255,102,0.25);

    width: 150%;
    max-width: 150%;
    transform: translateX(-16%);

    position: relative;
    overflow: hidden;
}

.login-input::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,102,0.4), transparent);
    animation: neonSweep 3s infinite;
}

@keyframes neonSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.login-input:focus {
    border-color: #00ff66;
    box-shadow: 0 0 12px rgba(0,255,102,0.7);
}

/* BUTTON — HOLOGRAPHIC SHIMMER */
.login-btn {
    padding: 12px 14px;
    font-size: 1.2rem;
    background: rgba(0,255,102,0.1);
    border: 1px solid rgba(0,255,102,0.5);
    color: #00ff66;
    cursor: pointer;
    border-radius: 4px;
    text-shadow: 0 0 6px #00ff66;
    transition: 0.2s ease;

    width: 150%;
    max-width: 150%;
    transform: translateX(-16%);

    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 80%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(0,255,102,0.4), transparent);
    transform: skewX(-20deg);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { left: -120%; }
    60% { left: 140%; }
    100% { left: 140%; }
}

.login-btn:hover {
    background: rgba(0,255,102,0.2);
    box-shadow: 0 0 14px rgba(0,255,102,0.8);
    transform: translateX(-16%) translateY(-1px);
}

/* AUTHOR FOOTER */
.global-author {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 0.85rem;
    color: rgba(0,255,136,0.65);
    text-shadow: 0 0 6px rgba(0,255,136,0.6);
    pointer-events: none;
    user-select: none;
    z-index: 200;
}

/* ============================================================
   MOBILE FIXES
============================================================ */

@media (max-width: 600px) {

    html, body {
        overflow: hidden;
        -webkit-text-size-adjust: none;
    }

    .login-container {
        max-width: 90%;
        transform: none !important;
    }

    .login-input,
    .login-btn {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .login-input::before,
    .login-btn::after {
        display: none;
    }

    .login-subtitle {
        font-size: 1.2rem;
        border-right-width: 1px;
    }

    #matrixRain {
        width: 100vw !important;
        height: 100vh !important;
    }

    .login-logo {
        width: 140px;
    }
}
