:root {
    --color-primario: #34A853;
    --color-secundario: #1E8541;
    --color-acento: #4285F4;
    --color-texto: #333333;
    --color-fondo: #F5F5F5;
    --sombra-suave: 0 5px 15px rgba(0, 0, 0, 0.08);
    --sombra-media: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transicion: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.contenedor-login {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 10;
}

.tarjeta-login {
    background-color: white;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: var(--sombra-media);
    overflow: hidden;
    position: relative;
}

.encabezado-tarjeta {
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    padding: 30px 0;
    text-align: center;
    position: relative;
}

.logo-encabezado {
    color: white;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.logo-encabezado i {
    font-size: 1.8rem;
}

.logo-encabezado b {
    margin-right: 4px;
}

.cuerpo-tarjeta {
    padding: 40px 30px;
    position: relative;
}

.mensaje-bienvenida {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: var(--color-texto);
    font-weight: 500;
}

.grupo-formulario {
    margin-bottom: 25px;
    position: relative;
}

.etiqueta-campo {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
}

.campo-entrada {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: var(--transicion);
}

.campo-entrada:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.15);
    background-color: white;
}

.icono-campo {
    position: absolute;
    right: 15px;
    top: 43px;
    color: #999;
}

.boton-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--color-primario), var(--color-secundario));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    box-shadow: 0 4px 8px rgba(30, 133, 65, 0.25);
    position: relative;
    overflow: hidden;
}

.boton-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 133, 65, 0.3);
}

.boton-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 133, 65, 0.2);
}

.boton-login::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: var(--transicion);
}

.boton-login:hover::after {
    opacity: 1;
}

/* Elementos decorativos de fondo */
.forma-fondo {
    position: absolute;
    z-index: -1;
}

.forma-fondo-1 {
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(52, 168, 83, 0.1), rgba(66, 133, 244, 0.1));
}

.forma-fondo-2 {
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(52, 168, 83, 0.1));
}

.forma-fondo-3 {
    top: 50%;
    left: 60%;
    width: 200px;
    height: 200px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(225deg, rgba(52, 168, 83, 0.08), rgba(66, 133, 244, 0.08));
    animation: flotar 8s ease-in-out infinite;
}

.forma-fondo-4 {
    top: 20%;
    left: 10%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(225deg, rgba(66, 133, 244, 0.08), rgba(52, 168, 83, 0.08));
    animation: flotar 10s ease-in-out infinite reverse;
}

.icono-ambiental {
    position: absolute;
    opacity: 0.08;
    color: var(--color-primario);
}

.hoja {
    top: 15%;
    right: 5%;
    font-size: 3rem;
    transform: rotate(25deg);
    animation: flotar 10s ease-in-out infinite;
}

.coche {
    bottom: 10%;
    left: 8%;
    font-size: 3rem;
    animation: flotar 8s ease-in-out infinite;
}

.reciclaje {
    top: 60%;
    right: 7%;
    font-size: 2.5rem;
    transform: rotate(-15deg);
    animation: flotar 12s ease-in-out infinite;
}

/* Animación del coche conduciendo */
@keyframes conducir {
    0% {
        left: -50px;
        opacity: 0;
    }
    10% {
        left: -30px;
        opacity: 1;
    }
    80% {
        left: calc(100% + 20px);
        opacity: 1;
    }
    100% {
        left: calc(100% + 50px);
        opacity: 0;
    }
}

/* Animación para la línea de escritura */
@keyframes dibujar-linea {
    0% {
        width: 0;
        opacity: 0;
    }
    10% {
        width: 0;
        opacity: 1;
    }
    80% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0.2;
    }
}

@keyframes aparecer {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) scale(1.1);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes brillo {
    0% { text-shadow: 0 0 0 rgba(255,255,255,0); }
    50% { text-shadow: 0 0 10px rgba(255,255,255,0.8); }
    100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
}

.logo-encabezado {
    position: relative;
    overflow: visible;
    width: fit-content;
    margin: 0 auto;
    padding: 10px 20px;
}

@keyframes flotar {
    0% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tarjeta-login {
        max-width: 90%;
    }

    .cuerpo-tarjeta {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .encabezado-tarjeta {
        padding: 25px 0;
    }

    .logo-encabezado {
        font-size: 1.7rem;
    }

    .cuerpo-tarjeta {
        padding: 25px 15px;
    }

    .mensaje-bienvenida {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .campo-entrada {
        padding: 12px 15px;
    }
}