/* Dictionary definition popup */
.dict-popup {
    position: absolute;
    background: #fdf6ec;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 240px;
    padding: 0.75rem;
    border-radius: 4px;
    font-family: inherit;
    z-index: 200;
    animation: dict-fade-in 0.15s ease-in-out;
}

.dict-popup__loading {
    font-style: italic;
    color: #888;
    font-size: 0.9rem;
}

.dict-popup__word {
    font-weight: bold;
    display: block;
    margin-bottom: 0.2rem;
}

.dict-popup__pos {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
    display: block;
}

.dict-popup__phonetic {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 0.4rem;
}

.dict-popup__definition {
    font-weight: normal;
    margin-top: 0.4rem;
    font-size: 0.95rem;
}

@keyframes dict-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dictionary toggle button */
.dict-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #bbb;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 100;
}

.dict-toggle:hover {
    opacity: 1;
}

.dict-toggle.active {
    background-color: #2c2c2c;
    color: #f0e6d3;
    border-color: #2c2c2c;
    opacity: 1;
}
