:root {
    --primary-blue: #39ff88;
    --secondary-blue: #10b957;
    --accent-blue: #8affb5;
    --dark-bg: #080b09;
    --darker-bg: #000000;
    --card-bg: #ffffff;
    --text-primary: #102018;
    --text-secondary: #52645a;
    --error-red: #ff3366;
    --success-green: #00cc88;
    --border-color: rgba(57, 255, 136, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 10; /* Aumentado para estar por encima de las decoraciones */
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(57, 255, 136, 0.08), transparent 34%), radial-gradient(circle at 85% 80%, rgba(16, 185, 87, 0.08), transparent 36%);
    pointer-events: none;
}

/* Efectos de fondo */
.decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    background: var(--primary-blue);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite;
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
}

.circle:nth-child(2) {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
    animation-delay: -5s;
}
.circle:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(50px, 50px); }
    50% { transform: translate(0, 100px); }
    75% { transform: translate(-50px, 50px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Tarjeta de login */
.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 0 18px rgba(57, 255, 136, 0.28), 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    animation: slideUp 0.6s ease-out;
    z-index: 20; /* Asegura que la tarjeta esté por encima */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    z-index: 21;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 22;
}

.logo {
    width: 190px;
    height: 72px;
    background: #050807;
    border: 1px solid var(--primary-blue);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 14px rgba(57, 255, 136, 0.28);
}

.logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.login-header h1 {
    color: #102018;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Formulario */
.login-form {
    margin-bottom: 30px;
    position: relative;
    z-index: 22;
}

.input-group {
    margin-bottom: 24px;
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #30443a;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.input-group label i {
    color: var(--primary-blue);
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: #f7faf8;
    border: 2px solid var(--border-color); /* Cambiado a 2px para mejor visibilidad */
    border-radius: 12px;
    color: #102018;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(57, 255, 136, 0.18);
}

.input-group input::placeholder {
    color: #819087;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-group input:focus ~ .input-highlight {
    width: 100%;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px; /* Aumentado para mejor área de click */
    font-size: 18px;
    transition: color 0.3s ease;
    z-index: 30;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input:checked ~ .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Botón de login */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 255, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(5px);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mensaje */
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.message.success {
    background: rgba(0, 204, 136, 0.1);
    color: var(--success-green);
    border: 1px solid rgba(0, 204, 136, 0.2);
}

.message.error {
    background: rgba(255, 51, 102, 0.1);
    color: var(--error-red);
    border: 1px solid rgba(255, 51, 102, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.login-footer {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    position: relative;
    z-index: 22;
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.login-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.social-login {
    margin-top: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.social-icon:hover {
    background: var(--primary-blue);
    color: var(--text-primary);
    border-color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .logo i {
        font-size: 30px;
    }
}