/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Word Translation Feature */
.translatable-word {
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    padding: 0 2px;
    margin: 0 -2px;
}

.translatable-word:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--primary-light);
}

.translatable-word:active {
    background: rgba(168, 85, 247, 0.3);
}

.translatable-word.processing {
    animation: wordProcessing 0.8s ease-in-out infinite;
    background: rgba(168, 85, 247, 0.2);
    will-change: background-color;
}

@keyframes wordProcessing {
    0%, 100% {
        background: rgba(168, 85, 247, 0.2);
    }
    50% {
        background: rgba(168, 85, 247, 0.4);
    }
}

.translation-tooltip {
    position: fixed;
    background: var(--bg-card-solid);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), var(--glow-primary);
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
    max-width: 280px;
    text-align: center;
}

.translation-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.translation-tooltip .original-word {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.translation-tooltip .translated-word {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.translation-tooltip .no-translation {
    font-size: 16px;
    color: var(--text-muted);
    font-style: italic;
}

.translation-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary);
}

/* Breadcrumbs Navigation */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: var(--bg-card-solid);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumbs:empty {
    display: none;
}

.breadcrumb-item {
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--primary-light);
}

.breadcrumb-item.current {
    color: var(--text);
    cursor: default;
}

.breadcrumb-separator {
    color: var(--text-muted);
}
