
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f5f5f5;
    --text-color: #333;
    --card-background-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #2980b9;
    --secondary-color: #27ae60;
    --background-color: #2c3e50;
    --text-color: #ecf0f1;
    --card-background-color: #34495e;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    margin: 0;
}

#theme-toggle {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

#search-form {
    display: flex;
}

#search-input {
    border: none;
    padding: 0.5rem;
    border-radius: 5px 0 0 5px;
}

#search-form button {
    border: none;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

#word-container {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.card {
    background-color: var(--card-background-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.word {
    margin: 0;
    font-size: 1.5rem;
}

.play-audio {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

.pronunciation {
    color: #777;
    margin-top: 0.5rem;
}

.definitions {
    margin-top: 1rem;
}

.definition {
    margin-bottom: 1rem;
}

.definition p {
    margin: 0.5rem 0;
}

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