:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --background-color: #f5f7fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --card-background: #f9f9f9;
    --header-background: white;
    --content-background: white;
}

[data-theme="dark"] {
    --primary-color: #4fa3e0;
    --secondary-color: #3498db;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #404040;
    --card-background: #2d2d2d;
    --header-background: #2d2d2d;
    --content-background: #2d2d2d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--header-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--secondary-color);
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
    gap: 8px;
}

.letter {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.letter:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.letter.active {
    background-color: var(--secondary-color);
    color: white;
}

.view-options {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.view-button {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.view-button:first-child {
    border-radius: 4px 0 0 4px;
}

.view-button:last-child {
    border-radius: 0 4px 4px 0;
}

.view-button.active {
    background-color: var(--primary-color);
    color: white;
}

.dictionary-content {
    background-color: var(--content-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.letter-heading {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.word-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.word-card {
    background-color: var(--card-background);
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.3s;
    cursor: pointer;
    border-left: 4px solid var(--primary-color);
}

.word-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.word {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.definition {
    font-size: 14px;
    color: #666;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px;
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

@media (max-width: 768px) {
    .word-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .alphabet-nav {
        gap: 5px;
    }
    
    .letter {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

.hidden {
    display: none;
}