/* RESET Y CONFIGURACIÓN GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* CONTENEDOR PRINCIPAL*/
.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TÍTULO*/
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

/* SECCIÓN DE AUTENTICACIÓN */
.auth-section {
    margin-bottom: 30px;
    text-align: center;
}

/*BOTONES*/
.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    font-weight: bold;
    width: 100%;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/*BUSQUEDA*/
.search-section {
    display: none;
    margin-top: 20px;
    animation: slideDown 0.4s ease-out;
}

.search-section.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/*INPUT*/
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
    font-size: 14px;
}

input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/*POKEMON*/
.pokemon-result {
    display: none;
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    animation: scaleIn 0.4s ease-out;
}

.pokemon-result.active {
    display: block;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pokemon-result h2 {
    color: #667eea;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.pokemon-result img {
    width: 180px;
    height: 180px;
    margin: 15px 0;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    transition: transform 0.3s;
}

.pokemon-result img:hover {
    transform: scale(1.1) rotate(5deg);
}

/* INFO*/
.pokemon-info {
    text-align: left;
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.pokemon-info p {
    padding: 10px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #eee;
}

.pokemon-info p:last-child {
    border-bottom: none;
}

.pokemon-info strong {
    color: #667eea;
    display: inline-block;
    min-width: 100px;
}

/* ERROR*/
.error-message {
    display: none;
    background: #ff6b6b;
    color: white;
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    animation: shake 0.5s;
}

.error-message.active {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* MENSAJE*/
.status {
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    animation: fadeIn 0.3s;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* SIMBOLO CARGA*/
.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* RESPONSIVE */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.5em;
    }

    .pokemon-result img {
        width: 140px;
        height: 140px;
    }
}