* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background: #f4f4f4;
}
header {
background: #222;
color: white;
text-align: center;
padding: 25px;
}
header h1 {
margin-bottom: 15px;
}
.search-box {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
}
4
input {
padding: 12px;
width: 280px;
border-radius: 5px;
border: none;
}
button {
padding: 12px 20px;
border: none;
border-radius: 5px;
background: #ff4757;
color: white;
cursor: pointer;
transition: 0.3s;
}
button:hover {
background: #ff6b81;
}
#loading {
text-align: center;
font-size: 20px;
padding: 20px;
}
.hidden {
display: none;
}
#results {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
padding: 20px;
}
.card {
background: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
transition: transform 0.3s;
}
.card:hover {
transform: scale(1.03);
}
5
.card img {
width: 100%;
height: 350px;
object-fit: cover;
}
.card-content {
padding: 15px;
}
.card-content h2 {
margin-bottom: 10px;
}
.card-content p {
margin-bottom: 8px;
}
.card-content div {
margin-top: 10px;
line-height: 1.5;
}
@media (max-width: 600px) {
input {
width: 100%;
}
}
.search-box {
flex-direction: column;
align-items: center;
}