/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* --- FONDO INTERACTIVO --- */
#globeViz {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    transform: translateX(25%);
    opacity: 0.3;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* --- CAPA DE CONTENIDO --- */
.content-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%);
    overflow: hidden;
    pointer-events: none;
}

header,
.login-container {
    pointer-events: auto;
}

/* --- HEADER --- */
header {
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
}

.logo a:hover .logo-text {
    color: #0066ff;
    border-bottom: 1px solid #0066ff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 5px;
    border-bottom: 1px solid transparent;
}

nav a:hover,
nav a.active {
    color: #0066ff;
    border-bottom: 1px solid #0066ff;
}

/* --- LOGIN CONTAINER --- */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 40px;
    max-width: 460px;
    width: 100%;
    backdrop-filter: blur(3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: 35px;
}

.card-header h1 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.card-header h1 span {
    font-weight: 700;
    color: #0066ff;
}

.card-header .subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 300;
}

/* --- FORMULARIO --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label svg {
    color: #0066ff;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: #0066ff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

/* Password field with toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #0066ff;
}

.toggle-password.active {
    color: #0066ff;
}

/* --- OPCIONES DEL FORMULARIO --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0066ff;
    cursor: pointer;
}

.forgot-password {
    color: #0066ff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- BOTÓN DE LOGIN --- */
.login-btn {
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    border: none;
    color: #fff;
    padding: 15px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn svg {
    transition: transform 0.3s ease;
}

.login-btn:hover svg {
    transform: translateX(5px);
}

/* --- DIVIDER --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 15px;
}

/* --- SOCIAL LOGIN --- */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* --- REGISTRO LINK --- */
.register-link {
    text-align: center;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.register-link p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.register-link a {
    color: #0066ff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.register-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- MENSAJES --- */
.login-message {
    display: none;
    padding: 14px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

.login-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
}

.login-message.loading {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    color: #0066ff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .content-overlay {
        overflow: visible;
        min-height: 100vh;
        height: auto;
    }

    header {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .login-card {
        padding: 30px 25px;
        margin: 20px;
    }

    .card-header h1 {
        font-size: 1.6rem;
    }

    .social-login {
        grid-template-columns: 1fr;
    }
}