body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #f9f9f9;
}

h1 {
    text-align: center;
    margin-top: 20px;
}

form {
    text-align: center;
    margin-bottom: 20px;
}

form input[name="search"],
form input[name="year"] {
    display: inline-block; /* чтобы быть в ряд */
    width: 200px;           /* подбираем ширину */
    margin: 0 5px 10px 5px;
}

form button {
    display: inline-block;
    margin: 0 5px 10px 5px;
}


#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 10px;
}

.thumb {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.thumb:hover {
    transform: scale(1.03);
}

.thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.thumb p {
    font-size: 16px;
    font-weight: bold;
    margin: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pagination {
    text-align: center;
    margin: 20px 0;
}

#pagination a {
    padding: 8px 12px;
    margin: 0 4px;
    background: #0073e6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

#pagination a:hover {
    background: #005bb5;
}

form input, form textarea {
    display: block;
    margin: 5px auto;
    width: 300px;
}

textarea {
    height: 80px;
}
