/* ===================== LOGIN PAGE STYLES ===================== */

/* Font face - same as main app */
@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/static/Orbitron-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/static/Orbitron-Bold.ttf') format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/static/Orbitron-Black.ttf') format('truetype');
    font-weight: 900;
}

/* ---- Reset & Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: 'Orbitron', system-ui, -apple-system, sans-serif;
    background: transparent;
    color: #e0e0e0;
    overflow: hidden;
}

/* ---- Canvas fondo partículas ---- */
#particles-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    display: block;
}

/* ---- Login Container ---- */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* ---- Login Card (Glassmorphism) ---- */
.login-card {
    background: rgba(22, 22, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 204, 224, 0.15);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 0 40px rgba(0, 204, 224, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: cardAppear 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    box-shadow:
        0 0 50px rgba(0, 204, 224, 0.12),
        0 25px 70px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shake animation for error */
.login-card.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-12px);
    }

    40% {
        transform: translateX(12px);
    }

    60% {
        transform: translateX(-8px);
    }

    80% {
        transform: translateX(8px);
    }
}

/* ---- Header ---- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #00cce0;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.login-logo::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00cce0, transparent);
    margin: 8px auto 0;
    border-radius: 2px;
}

.login-subtitle {
    font-size: 0.75rem;
    color: #888;
    margin-top: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Form ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.7rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-icon {
    width: 16px;
    height: 16px;
    stroke: #00cce0;
    flex-shrink: 0;
}

.error-icon {
    width: 18px;
    height: 18px;
    stroke: #ff6b8a;
    flex-shrink: 0;
}

.form-group input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: #e0e0e0;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #555;
    font-size: 0.75rem;
}

.form-group input:focus {
    border-color: rgba(0, 204, 224, 0.5);
    background: rgba(0, 204, 224, 0.04);
    box-shadow: 0 0 15px rgba(0, 204, 224, 0.1);
}

/* ---- Error Message ---- */
.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid rgba(255, 0, 85, 0.3);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    animation: errorAppear 0.3s ease-out;
}

.error-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.error-text {
    font-size: 0.75rem;
    color: #ff6b8a;
}

@keyframes errorAppear {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Login Button ---- */
.login-btn {
    background: linear-gradient(135deg, #00a5b6, #00cce0);
    border: none;
    border-radius: 10px;
    padding: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0a0a0f;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 204, 224, 0.35);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 204, 224, 0.2);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn.success {
    background: linear-gradient(135deg, #00b359, #00ff85);
    transition: background 0.3s ease;
}

/* Spinner */
.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(10, 10, 15, 0.3);
    border-top-color: #0a0a0f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Footer ---- */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.version-tag {
    font-size: 0.6rem;
    color: #555;
    letter-spacing: 1px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .login-logo {
        font-size: 1.8rem;
    }
}