/* ==========================================================================
   ФИНАЛЬНЫЙ СУПЕР-ФИКС ДЛЯ ТЕГОВ (Перебивает инлайн-стили и любые темы)
   ========================================================================== */

/* 1. Выравнивание родительских контейнеров */
html body .tagcloud,
html body .post-tags,
html body .entry-tags,
html body .tags-links,
html body .custom-tags-container,
html body .footer-tags-container,
html body div[class*="tag"],
html body p[class*="tag"] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 10px !important;
    margin: 20px auto !important;
    padding: 0 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. Стилизация ВСЕХ ссылок-тегов по их адресам */
html body a[href*="/tag/"],
html body .tagcloud a,
html body .post-tags a,
html body .entry-tags a,
html body .tags-links a,
html body .custom-tag-item,
html body div[class*="tag"] a {
    /* Сброс растяжения на всю ширину */
    width: auto !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Тёмный дизайн под тему */
    background-color: #10141d !important;
    background: #10141d !important;
    color: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 20px !important;
    
    /* Размеры и отступы */
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    margin: 2px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.25s ease !important;
    
    /* Перенос слов */
    white-space: normal !important;
    word-break: break-word !important;
}

/* 3. Эффект при наведении */
html body a[href*="/tag/"]:hover,
html body .tagcloud a:hover,
html body .post-tags a:hover,
html body .entry-tags a:hover,
html body .tags-links a:hover,
html body .custom-tag-item:hover,
html body div[class*="tag"] a:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
    color: #ffffff !important;
    border-color: #ffd700 !important;
    transform: translateY(-2px) !important;
}

/* 4. Мобильная адаптация */
@media (max-width: 768px) {
    html body a[href*="/tag/"],
    html body .tagcloud a,
    html body .post-tags a,
    html body .entry-tags a,
    html body .tags-links a,
    html body .custom-tag-item,
    html body div[class*="tag"] a {
        font-size: 12px !important;
        padding: 5px 11px !important;
    }
}