/* ===== GIA LINH TOOLS - LOGIN PAGE CSS =====
   Requires: css/variables.css to be loaded first
   Version 1.0 - Extracted from index.html inline styles */

/* ===== Reset - uses variables.css values ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Background grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ===== Glow orbs ===== */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 217, 255, 0.1);
    top: -150px;
    right: -100px;
}

.glow-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(255, 0, 170, 0.08);
    bottom: -100px;
    left: -100px;
}

/* ===== Login Container ===== */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-cyan);
    margin: 0 auto 20px;
    box-shadow: var(--glow-cyan);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: var(--glow-cyan);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.5);
    }
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header h1 span {
    color: var(--accent-cyan);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-group input:focus + i,
.form-group input:focus ~ i {
    color: var(--accent-cyan);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ===== Login Button ===== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--accent-cyan);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    background: #00c4e6;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* ===== Error Message ===== */
.error-message {
    background: rgba(255, 0, 100, 0.1);
    border: 1px solid rgba(255, 0, 100, 0.3);
    color: #ff6b9d;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
}

.error-message.show {
    display: flex;
}

/* ===== Footer ===== */
.footer-text {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-text i {
    color: var(--accent-magenta);
}

.footer-text a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.footer-text a:hover {
    opacity: 0.8;
}

/* ===== Animations ===== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20%, 60% {
        transform: translateX(-5px);
    }
    40%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* ===== TECH CURSOR EFFECTS ===== */
.tech-cursor {
    position: fixed;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
}

.tech-cursor::before,
.tech-cursor::after {
    content: '';
    position: absolute;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
}

.tech-cursor::before {
    width: 40px;
    height: 2px;
    left: -20px;
    top: -1px;
}

.tech-cursor::after {
    width: 2px;
    height: 40px;
    left: -1px;
    top: -20px;
}

.cursor-center {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: calc(var(--z-cursor) + 1);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 30px var(--accent-cyan);
    animation: pulse-center 1.5s ease-in-out infinite;
}

@keyframes pulse-center {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

.cursor-bracket {
    position: fixed;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: calc(var(--z-cursor) - 1);
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out;
}

.cursor-bracket::before,
.cursor-bracket::after,
.cursor-bracket span::before,
.cursor-bracket span::after {
    content: '';
    position: absolute;
    background: var(--accent-cyan);
    opacity: 0.6;
}

.cursor-bracket::before {
    width: 15px;
    height: 2px;
    top: 0;
    left: 0;
}

.cursor-bracket::after {
    width: 2px;
    height: 15px;
    top: 0;
    left: 0;
}

.cursor-bracket span:nth-child(1)::before {
    width: 15px;
    height: 2px;
    top: 0;
    right: 0;
    left: auto;
}

.cursor-bracket span:nth-child(1)::after {
    width: 2px;
    height: 15px;
    top: 0;
    right: 0;
    left: auto;
}

.cursor-bracket span:nth-child(2)::before {
    width: 15px;
    height: 2px;
    bottom: 0;
    left: 0;
    top: auto;
}

.cursor-bracket span:nth-child(2)::after {
    width: 2px;
    height: 15px;
    bottom: 0;
    left: 0;
    top: auto;
}

.cursor-bracket span:nth-child(3)::before {
    width: 15px;
    height: 2px;
    bottom: 0;
    right: 0;
    left: auto;
    top: auto;
}

.cursor-bracket span:nth-child(3)::after {
    width: 2px;
    height: 15px;
    bottom: 0;
    right: 0;
    left: auto;
    top: auto;
}

.cursor-bracket span {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* ===== Tech Grid Canvas ===== */
#techGrid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* ===== Data Line Effects ===== */
.data-line {
    position: fixed;
    height: 2px;
    pointer-events: none;
    z-index: 9995;
    background: linear-gradient(90deg, transparent 0%, var(--accent-cyan) 50%, transparent 100%);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: data-flow 0.8s linear forwards;
}

@keyframes data-flow {
    0% {
        width: 0;
        opacity: 1;
    }
    50% {
        width: 150px;
        opacity: 1;
    }
    100% {
        width: 150px;
        opacity: 0;
        transform: translateX(100px);
    }
}

.data-line.vertical {
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, transparent 0%, var(--accent-magenta) 50%, transparent 100%);
    box-shadow: 0 0 10px var(--accent-magenta);
    animation: data-flow-vertical 0.8s linear forwards;
}

@keyframes data-flow-vertical {
    0% {
        height: 0;
        opacity: 1;
    }
    50% {
        height: 150px;
        opacity: 1;
    }
    100% {
        height: 150px;
        opacity: 0;
        transform: translateY(100px);
    }
}

/* ===== Hex Node Effect ===== */
.hex-node {
    position: fixed;
    width: 30px;
    height: 26px;
    pointer-events: none;
    z-index: 9996;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: transparent;
    border: 2px solid var(--accent-cyan);
    animation: hex-appear 1s ease-out forwards;
}

@keyframes hex-appear {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.2) rotate(30deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.5) rotate(90deg);
        opacity: 0;
    }
}

/* ===== Scan Line Effect ===== */
.scan-line {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 3px;
    pointer-events: none;
    z-index: 9994;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 217, 255, 0.3) 20%, 
        rgba(0, 217, 255, 0.8) 50%, 
        rgba(0, 217, 255, 0.3) 80%, 
        transparent 100%
    );
    box-shadow: 0 0 20px var(--accent-cyan), 0 0 40px var(--accent-cyan);
    animation: scan-move 0.5s ease-out forwards;
}

@keyframes scan-move {
    0% {
        opacity: 1;
        transform: scaleX(0.3);
    }
    50% {
        opacity: 0.8;
        transform: scaleX(1);
    }
    100% {
        opacity: 0;
        transform: scaleX(1);
    }
}
