/* Index page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px 0;
    text-align: center;
    animation: slideIn 1s ease-out;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease-out;
}

header p {
    font-size: 1.2rem;
    animation: fadeInUp 1.2s ease-out;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 10px;
    background-color: #333;
    animation: fadeIn 1.5s ease-out;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #4CAF50;
}

main {
    margin-top: 40px;
}

#search {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out forwards;
}

#search h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

#search-form {
    display: inline-block;
    margin-top: 10px;
}

#search-input {
    padding: 10px;
    font-size: 1rem;
    width: 250px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #4CAF50;
}

#search-form button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#search-form button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

#features {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 1.8s ease-out forwards;
}

.feature {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 28%;
    min-width: 250px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    opacity: 0;
    animation: fadeInUp 2s ease-out forwards;
}

.feature:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
    background-color: #e8f5e9;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4CAF50;
}

.feature p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

#cta {
    text-align: center;
    margin-top: 40px;
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 5px;
    opacity: 0;
    animation: fadeInUp 2s ease-out forwards;
}

#cta h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

#cta p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: #4CAF50;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #4CAF50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}

.cta-button:hover,
.cta-button:focus {
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.cta-button:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    background-color: #333;
    color: white;
    animation: fadeInUp 2.5s ease-out forwards;
}

footer p {
    font-size: 1rem;
}

@media screen and (max-width: 768px) {
    #features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 80%;
        margin-bottom: 20px;
    }

    #cta {
        margin-top: 30px;
    }

    #search-form {
        display: block;
        margin: 0 auto;
    }

    #search-input {
        width: 80%;
        margin-bottom: 10px;
    }

    #search-form button {
        width: 100%;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Search Page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
}

main {
    margin-top: 40px;
}

#search {
    text-align: center;
    margin-bottom: 30px;
}

#search h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

#search-form {
    display: inline-block;
    margin-top: 10px;
}

#search-input {
    padding: 10px;
    font-size: 1rem;
    width: 250px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #4CAF50;
}

#search-form button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#search-form button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

#search-results {
    margin-top: 30px;
}

.result-item {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.result-item h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.result-item p {
    font-size: 1rem;
    color: #555;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    background-color: #333;
    color: white;
}

footer p {
    font-size: 1rem;
}

#search-results {
    margin-top: 40px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#search-results h2 {
    font-size: 2rem;
    color: #333;
}

#search-results #search-query {
    font-weight: bold;
    color: #4CAF50;
}

#results-container {
    margin-top: 20px;
}

.result-item {
    background-color: #f9f9f9;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-word {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.part-of-speech {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 10px;
}

.definition {
    margin-left: 20px;
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
}

.definition p {
    margin: 5px 0;
}

.definition strong {
    color: #333;
}

.definition example {
    font-style: italic;
    color: #888;
}

@media screen and (max-width: 768px) {
    #search-results h2 {
        font-size: 1.6rem;
    }

    .result-item {
        padding: 15px;
    }

    .result-word {
        font-size: 1.5rem;
    }

    .part-of-speech {
        font-size: 1rem;
    }

    .definition {
        font-size: 0.95rem;
    }
}

audio {
    width: 100%;
    max-width: 350px;
    margin-top: 10px;
    transition: transform 0.3s ease-in-out;
}

audio:hover {
    transform: scale(1.05);
}

audio::-webkit-media-controls-panel {
    background-color: #4CAF50;
    border-radius: 10px;
}

audio::-webkit-media-controls-play-button {
    background-color: #4CAF50;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    transition: background-color 0.3s ease;
}

audio::-webkit-media-controls-play-button:hover {
    background-color: #45a049;
}

audio::-webkit-media-controls-volume-slider {
    background-color: #ddd;
    border-radius: 5px;
}

audio:focus {
    outline: none;
    border: 2px solid #4CAF50;
}
/* Table Styles */
#search-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

#search-history-table th, 
#search-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#search-history-table th {
    background-color: #4CAF50;
    color: white;
    font-size: 1.1rem;
}

#search-history-table td {
    font-size: 1rem;
    color: #555;
}

#search-history-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#search-history-table tr:hover {
    background-color: #e8f5e9;
}

#search-history-table td,
#search-history-table th {
    transition: background-color 0.3s ease;
}


#search-history-table th {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}


#search-history-table tr:hover {
    cursor: pointer;
    background-color: #f1f1f1;
}
/* About Page Styles */
#about-page main h2 {
    color: #4CAF50;
    font-size: 2rem;
    margin-bottom: 15px;
}

#about-page main p,
#about-page main ul li {
    font-size: 1rem;
    color: #555;
}

#about-page main ul {
    padding-left: 20px;
    list-style: disc;
}


/* Active Navigation Link */
nav ul li a.active {
    background-color: #4CAF50; /* Highlight the active link */
    color: white; /* Ensure contrast */
    font-weight: bold; /* Make it stand out */
    text-decoration: underline; /* Optional: underline */
}

.contact-form{
    padding: 20px;
    max-width: 70%;
 
  }

.contact-info{
    padding: 20px;
    max-width: 70%;
  }
