:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --letter-color: #0073e6;
    --hover-color: #005bb5;
    --font-family: 'Arial', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
}

.glossary-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.glossary-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.glossary-letter {
    padding: 10px 15px;
    background-color: var(--letter-color);
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.glossary-letter:hover,
.glossary-letter.active {
    background-color: var(--hover-color);
    color: #ffffff;
}

.glossary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: var(--bg-color);
    gap: 15px;
}

.glossary-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 5px;
}

.glossary-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glossary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.glossary-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color) !important; /* Ensure title color applies dynamically */
}

.glossary-content h3 a {
    text-decoration: none;
    color: var(--text-color) !important; /* Ensure link color applies dynamically */
}

.glossary-content h3 a:hover {
    color: var(--hover-color) !important; /* Hover color for links */
}

.glossary-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color) !important; /* Ensure description color applies dynamically */
}

.glossary-pagination {
    text-align: center;
    margin-top: 20px;
}

.glossary-pagination a,
.glossary-pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f8f8;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.glossary-pagination a:hover {
    background-color: var(--hover-color);
    color: #ffffff;
}

.glossary-pagination .current {
    background-color: var(--letter-color);
    color: #ffffff;
    font-weight: bold;
}

.glossary-search {
    text-align: center;
    margin: 20px 0;
}

.glossary-search input {
    width: 80%;
    max-width: 600px;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease-in-out;
}

.glossary-search input:focus {
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: var(--letter-color);
}