:root {
    --bg: #ffffff;
    --text: #333333;
    --card: #f8f9fa;
    --primary: #007bff;
}

body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: 'Segoe UI', sans-serif;
    margin: 0; padding: 20px; transition: 0.3s;
}

.container { max-width: 900px; margin: auto; }
.main-nav { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 2px solid var(--primary); margin-bottom: 20px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--text); font-weight: bold; margin-right: 15px; }

.proverb-card { background: var(--card); border: 1px solid rgba(0,0,0,0.1); padding: 20px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.proverb-card h3 a { color: var(--primary); text-decoration: none; }

.word-link { color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary); }
.btn { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }

/* Alphabet Filter */
.alphabet-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0; }
.char-item { text-decoration: none; border: 1px solid var(--primary); padding: 4px 8px; border-radius: 4px; color: var(--text); font-size: 0.9em; }
.proverb-metadata p { margin-bottom: 8px; line-height: 1.4; }
.proverb-title { font-size: 1.8em; margin-bottom: 20px; color: var(--primary); }

.word-breakdown {
    background: rgba(0,0,0,0.03);
    padding: 15px;
    border-radius: 8px;
}

.words-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1.2em;
    line-height: 2;
}

.highlight-word {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

.plain-word {
    opacity: 0.8;
}

[data-theme="dark"] .word-breakdown {
    background: rgba(255,255,255,0.05);
}

/* Container for the words */
.words-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between the tablets */
    align-items: center;
}

/* The Tablet / Pill Shape */
.word-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px; /* Creates the tablet/pill shape */
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Distinct style for words found in the dictionary */
.word-pill.linked {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
    background: rgba(77, 163, 255, 0.05); /* Light tint of primary color */
}

/* Hover effect only for linked words */
.word-pill.linked:hover {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Style for words NOT in the dictionary */
span.word-pill {
    opacity: 0.7;
    border-style: dashed; /* Differentiate unlinked words visually */
}
.tag-pill {
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--primary);
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--primary);
    background: var(--card);
    transition: 0.3s;
}

.tag-pill:hover, .active-tag {
    background: var(--primary);
    color: #fff !important;
}

.mini-tag {
    text-decoration: none;
    font-size: 0.75em;
    color: var(--text);
    opacity: 0.6;
    margin-right: 8px;
}

.mini-tag:hover {
    color: var(--primary);
    opacity: 1;
}

