*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#f4f6f9;
}

/* HEADER */

header{
    background:#1565C0;
    color:white;
    padding:20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
}

header h1{
    font-size:32px;
}

header input{
    width:320px;
    max-width:100%;
    padding:12px;
    border:none;
    border-radius:5px;
    font-size:16px;
}

/* GRID */

.container{
    padding:30px;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
    gap:25px;
}

/* CARD */

.card{

    background:white;

    border-radius:12px;

    overflow:hidden;

    box-shadow:0 5px 15px rgba(0,0,0,.15);

    transition:.3s;

}

.card:hover{

    transform:translateY(-5px);

}

.card img{

    width:100%;

    height:320px;

    object-fit:cover;

    background:#ddd;

}

.card h3{

    padding:15px;

    text-align:center;

    color:#333;

}

.card a{

    text-decoration:none;

}

/* MOBILE */

@media(max-width:768px){

header{

    justify-content:center;

}

header h1{

    width:100%;

    text-align:center;

    margin-bottom:15px;

}

header input{

    width:100%;

}

.viewer{

display:flex;

justify-content:center;

align-items:center;

height:calc(100vh - 140px);

overflow:auto;

padding:20px;

}

.viewer img{

max-width:95%;

box-shadow:0 5px 25px rgba(0,0,0,.25);

transition:.3s;

}

footer{

height:70px;

display:flex;

justify-content:center;

align-items:center;

gap:20px;

background:white;

}

footer button{

padding:10px 18px;

cursor:pointer;

}

.dark{

background:#1f1f1f;

}

.dark header{

background:#111;

}

.dark footer{

background:#111;

color:white;

}

.dark .viewer{

background:#222;

}

}