*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
    list-style:none;
}

body{
    background:linear-gradient(180deg,#f7f8fc,#e9edf5);
    color:#2d3436;
    min-height:100vh;
}

header{
    background:linear-gradient(135deg,#d32f2f,#ef5350);
    color:white;
    text-align:center;
    padding:35px 20px;
    box-shadow:0 10px 30px rgba(0,0,0,.18);
}

header h1{
    font-size:2.7rem;
    letter-spacing:2px;
}

header p{
    margin-top:10px;
    opacity:.9;
}

main{

    width:min(1200px,92%);
    margin:50px auto;
    display:grid;
    grid-template-columns:420px 1fr;
    gap:40px;
    align-items:start;
}

section{
    background:white;
    border-radius:22px;
    padding:30px;
    box-shadow:0 18px 45px rgba(0,0,0,.08);
}

section h2{
    margin-bottom:25px;
    font-size:1.6rem;
}

.contenedor-input{
    display:flex;
    flex-direction:column;
    gap:15px;
}

input{
    width:100%;
    padding:15px 18px;
    border-radius:12px;
    border:2px solid #ddd;
    font-size:1rem;
    transition:.3s;
}

input:focus{
    outline:none;
    border-color:#ef5350;
    box-shadow:0 0 15px rgba(239,83,80,.25);
}

button{
    border:none;
    border-radius:12px;
    cursor:pointer;
    transition:.3s;
    font-weight:600;
}

button:hover{
    transform:translateY(-3px);
}

button:active{
    transform:scale(.98);
}

#btn-search{
    background:#ef5350;
    color:white;
    padding:15px;
}

#btn-search:hover{
    background:#d32f2f;
}

#btn-favorite{
    margin-top:25px;
    width:100%;
    padding:15px;
    background:#ffd54f;
    color:#333;
}

#btn-favorite:hover{
    background:#ffca28;
}

#btn-clear-all{
    background:#f44336;
    color:white;
    padding:10px 18px;
}

#btn-clear-all:hover{
    background:#d32f2f;
}

#resultado{
    margin-top:30px;
    background:#fafafa;
    border:2px dashed #ef5350;
    border-radius:18px;
    padding:25px;
    text-align:center;
    min-height:320px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

#resultado img{
    width:220px;
    height:220px;
    image-rendering:pixelated;
    transition:.35s;
    filter:drop-shadow(0 10px 18px rgba(0,0,0,.25));
}

#resultado img:hover{
    transform:scale(1.08);
}

#resultado h3{
    margin-top:20px;
    font-size:2rem;
}

.mensaje-inicial img{
    width:90px !important;
    height:90px !important;
    opacity:.75;
}

.mensaje-inicial p{
    margin-top:20px;
    color:#666;
}

.titulo-favoritos{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

#favoritos{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
    gap:18px;
}

.favorite-card{
    background:#f8f9fc;
    border-radius:18px;
    padding:18px;
    display:flex;
    flex-direction:column;
    align-items:center;
    transition:.35s;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
}

.favorite-card:hover{
    transform:translateY(-6px);
}

.favorite-image{
    width:90px;
    height:90px;
    margin-bottom:10px;
}

.favorite-name{
    text-transform:capitalize;
    font-weight:600;
    margin-bottom:15px;
}

.btn-remove{
    background:#ef5350;
    color:white;
    padding:8px 16px;
}

.btn-remove:hover{
    background:#d32f2f;
}

@media(max-width:900px){
    main{
        grid-template-columns:1fr;
    }
}

@media(max-width:600px){
    header h1{
        font-size:2rem;
    }

    section{
        padding:22px;
    }

    #resultado img{
        width:170px;
        height:170px;
    }
}