* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
*:not(i) {
    font-family: "Poppins", sans-serif;
}

body {
    background: linear-gradient(135deg, #83a4d4, #b6fbff);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

header {
    text-align: center;
    color: #333;
    padding: 20px;
}

.header-container {
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    color: #342575;
    margin-bottom: 10px;
}

.container {
    background-color: #fff;
    width: 90%;
    max-width: 600px; /* Limiting max width for better layout */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    margin-bottom: 20px; /* Added margin for spacing with footer */
}

.search-box {
    display: flex;
    flex-direction: column; /* Change to column for smaller screens */
}

.search-input {
    padding: 15px;
    border: 2px solid #ae9cff;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

.search-input:focus {
    border-color: #342575;
    box-shadow: 0 0 5px rgba(162, 161, 255, 0.5);
    outline: none;
}

.search-button {
    padding: 15px 20px;
    background-color: #342575;
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px; /* Space above the button */
    transition: all 0.3s ease-in-out;
}

.search-button i {
    margin-right: 5px;
}

.search-button:hover {
    background-color: #453f70;
    transform: translateY(-3px);
}

.result {
    margin-top: 20px;
    color: #333;
}

.result h3 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #1f194c;
}

.result .details {
    display: flex;
    justify-content: space-between;
    color: #575a7b;
}

.word-meaning {
    color: #575a7b;
}

.word-example {
    font-style: italic;
    margin-top: 10px;
    color: #575a7b;
}

.error {
    margin-top: 20px;
    text-align: center;
    color: #e63946;
}

/* Footer Styles */
footer {
    background-color: #2f2a6d;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    width: 100%;
}

.footer-container {
    width: 90%;
    margin: 0 auto;
}

.features {
    margin-bottom: 10px;
}

.footer-icon {
    color: #ffffff;
    font-size: 28px;
    margin: 0 15px;
    transition: transform 0.3s, color 0.3s;
}

.footer-icon:hover {
    transform: scale(1.2);
    color: #ae9cff;
}

.footer-text {
    margin-top: 10px;
    font-size: 14px;
}

/* Responsive Styles */
@media only screen and (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column; /* Stack vertically on small screens */
    }

    .search-input {
        width: 100%; /* Full width */
        margin-bottom: 10px; /* Space below the input */
    }

    .search-button {
        width: 100%; /* Full width */
        font-size: 14px;
    }

    .result h3 {
        font-size: 1.25rem;
    }

    .result .details {
        font-size: 12px;
    }

    .footer-icon {
        font-size: 24px; /* Smaller icons for mobile */
    }
}
