html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 20px;
    overflow: hidden;
}

h1 {
    font-size: 2vw; /* smaller */
    margin-bottom: 10px;
    color: #333;
    width: 100%;
    max-width: 900px;
    text-align: center;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.search-input {
    flex-grow: 1;
    font-size: 0.9vw; /* smaller */
    padding: 8px;      /* smaller padding */
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    min-width: 150px;
}

.search-button {
    padding: 8px 16px; /* smaller */
    font-size: 0.9vw;  /* smaller */
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #0056b3;
}

.image-container {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.url-text, .search-term {
    font-size: 1vw; /* smaller */
    color: #333;
    margin-bottom: 5px;
    word-wrap: break-word;
    flex-shrink: 0;
}

.image-container img {
    width: 100%;
    max-height: 50vh; /* bigger */
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 1;
    margin-top: 5px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.button {
    padding: 8px 20px;  /* smaller */
    font-size: 0.9vw;   /* smaller */
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 100px;
}

.button:hover {
    background-color: #0056b3;
}

.footer {
    width: 100%;
    max-width: 900px;
    text-align: center;
    font-size: 0.8vw;  /* smaller */
    color: #777;
    margin-top: auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    h1 {
        font-size: 4vw;
    }
    .search-input, .search-button, .button, .url-text, .search-term {
        font-size: 2.5vw;
    }
    .image-container img {
        max-height: 30vh;
    }
}

@media (max-width: 400px) {
    body {
        padding: 10px;
    }
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    .search-input, .search-button, .button {
        width: 100%;
        font-size: 4vw;
        padding: 10px;
    }
}

