 /* Search Box Container */
.search-container {
    display: flex;
    flex-wrap: wrap; /* allow wrapping on mobile */
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px auto; /* center horizontally with bottom margin */
}

/* Search Input */
#searchBox { width:70%;
    flex: 1 1 300px; /* take available space */
    padding: 10px;
    font-size: 16px;
    border: 2px solid #007bff;
    border-radius: 5px;
    outline: none;
}

/* Buttons */
#searchBtn, #voiceSearchBtn {
    flex: 0 0 120px; /* fixed width for desktop */
    padding: 10px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s;
}

/* Button colors */
#searchBtn {
    background-color: #007bff;
}

#searchBtn:hover {
    background-color: #0056b3;
}

#voiceSearchBtn {
    background-color: #28a745;
}

#voiceSearchBtn:hover {
    background-color: #218838;
}

/* Headings */
h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

h3 {
    color: #007bff;
}

h4 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    margin: 5px 0 10px 0;
    color: #555;
}

/* Paragraphs & Lists */
p {
    font-size: 16px;
    color: #444;
}

ul {
    padding-left: 20px;
}

ul li {
    margin: 5px 0;
}

/* Error Messages */
p[style="color:red;"] {
    font-weight: bold;
}

/* Pronunciation Button Styling */
.pronounce-btn {
    background-color: lightgrey;
    border: none;
    color: white;
    padding: 5px 10px;
    margin-left: 5px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

.pronounce-btn:hover {
    background-color: gray;
}

/* Align pronounce button with word */
.word {
    display: inline-flex;
    align-items: center;
}

/* Synonyms */
.synonym {
    margin-bottom: 10px;
    display: block;
}

/* Conclusion text */
.conclusion {
    color: black;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: stretch; /* buttons full width */
    }

    #searchBox {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

    #searchBtn, #voiceSearchBtn {
        width: 100%;
        flex: 1 1 100%;
        font-size: 14px;
        padding: 10px;
    }
}
