/*
 * Улучшенные мобильные эффекты - работают поверх стабильной базы
 * Все эффекты НЕ ЛОМАЮТ базовую функциональность
 */

/* Только для мобильных устройств */
@media screen and (max-width: 768px) {
    
    /* Плавающие частицы в header */
    .article-header {
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
        background-size: 300% 300% !important;
        animation: gradientFloat 8s ease infinite !important;
    }

    .article-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, 
            rgba(255,255,255,0.1) 0%, 
            transparent 50%, 
            rgba(255,255,255,0.1) 100%);
        background-size: 200% 200%;
        animation: headerShimmer 3s ease-in-out infinite;
        pointer-events: none;
    }

    /* Магические карточки постов */
    .post-card {
        position: relative !important;
        overflow: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .post-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, 
            #28B76B, #667eea, #764ba2, #f093fb, #28B76B);
        background-size: 300% 100%;
        animation: cardBorderFlow 4s ease infinite;
        z-index: 1;
    }

    .post-card:active {
        transform: scale(0.98) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    }

    /* Интерактивные элементы навигации */
    .nav-link {
        position: relative !important;
        overflow: hidden !important;
        transition: all 0.2s ease !important;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(40, 183, 107, 0.1), 
            transparent);
        transition: left 0.4s ease;
        z-index: 0;
    }

    .nav-link:active::before {
        left: 100%;
    }

    .nav-link.active {
        background: linear-gradient(90deg, 
            rgba(40, 183, 107, 0.1), 
            rgba(40, 183, 107, 0.05)) !important;
        position: relative;
    }

    .nav-link.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #28B76B, #667eea);
        animation: activePulse 2s ease-in-out infinite;
    }

    /* Красивые кнопки */
    .btn {
        position: relative !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #28B76B, #22A55B) !important;
        transition: all 0.3s ease !important;
    }

    .btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255,255,255,0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        z-index: 1;
    }

    .btn:active::before {
        width: 200px;
        height: 200px;
    }

    .btn:active {
        transform: scale(0.95) !important;
        box-shadow: 0 2px 8px rgba(40, 183, 107, 0.3) !important;
    }

    /* Улучшенные изображения с fallback */
    .post-thumbnail {
        position: relative !important;
        overflow: hidden !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, 
            #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
        background-size: 300% 300% !important;
        animation: imageBgFlow 6s ease infinite !important;
    }

    .post-thumbnail::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at center, 
            rgba(255,255,255,0.1) 0%, 
            transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 2;
    }

    .post-card:active .post-thumbnail::after {
        opacity: 1;
    }

    /* Swipe индикатор */
    .sidebar::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -2px;
        width: 4px;
        height: 30px;
        background: linear-gradient(180deg, 
            rgba(40, 183, 107, 0.6),
            rgba(40, 183, 107, 0.2));
        border-radius: 2px;
        transform: translateY(-50%);
        opacity: 0;
        animation: swipeHint 4s ease infinite;
        z-index: 10;
    }

    /* Floating Action Button */
    .mobile-fab {
        position: fixed;
        bottom: calc(20px + env(safe-area-inset-bottom, 20px));
        right: 20px;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, #28B76B, #667eea);
        border-radius: 50%;
        box-shadow: 0 8px 25px rgba(40, 183, 107, 0.4);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        animation: fabFloat 3s ease-in-out infinite;
        overflow: hidden;
    }

    .mobile-fab .fab-icon {
        position: relative;
        z-index: 2;
        transition: transform 0.3s ease;
    }

    .mobile-fab.active .fab-icon {
        transform: rotate(45deg);
    }

    .mobile-fab .fab-menu {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-fab.active .fab-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-fab .fab-item {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, #28B76B, #22A55B);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 20px rgba(40, 183, 107, 0.3);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: scale(0.8);
    }

    .mobile-fab.active .fab-item {
        transform: scale(1);
    }

    .mobile-fab .fab-item:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(40, 183, 107, 0.5);
    }

    .mobile-fab .fab-item:active {
        transform: scale(0.9);
    }

    .mobile-fab:active {
        transform: scale(0.9);
        box-shadow: 0 4px 15px rgba(40, 183, 107, 0.6);
    }

    /* Pull to refresh индикатор */
    .pull-indicator {
        position: fixed;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        padding: 8px 16px;
        background: rgba(40, 183, 107, 0.9);
        color: white;
        border-radius: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        z-index: 1002;
        font-size: 14px;
        font-weight: 500;
    }

    /* Touch ripple эффекты */
    .touch-ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(40, 183, 107, 0.3);
        pointer-events: none;
        transform: scale(0);
        animation: touchRippleExpand 0.6s ease-out;
        z-index: 999;
    }

    /* Magic particles при touch */
    .touch-particle {
        position: fixed;
        width: 6px;
        height: 6px;
        background: radial-gradient(circle, 
            rgba(40, 183, 107, 0.8) 0%, 
            transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        animation: particleFloat 0.8s ease-out forwards;
    }

    /* Overlay с улучшенным blur */
    .mobile-menu-overlay {
        background: rgba(0, 0, 0, 0.4) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .mobile-menu-overlay.open {
        animation: overlayFadeIn 0.3s ease !important;
    }

    /* Анимации */
    @keyframes gradientFloat {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }

    @keyframes headerShimmer {
        0% { background-position: -200% -200%; }
        100% { background-position: 200% 200%; }
    }

    @keyframes cardBorderFlow {
        0% { background-position: 0% 0%; }
        50% { background-position: 100% 0%; }
        100% { background-position: 0% 0%; }
    }

    @keyframes activePulse {
        0%, 100% { opacity: 1; transform: scaleY(1); }
        50% { opacity: 0.7; transform: scaleY(0.8); }
    }

    @keyframes imageBgFlow {
        0%, 100% { background-position: 0% 50%; }
        25% { background-position: 100% 0%; }
        50% { background-position: 100% 100%; }
        75% { background-position: 0% 100%; }
    }

    @keyframes swipeHint {
        0%, 85%, 100% { opacity: 0; }
        45% { opacity: 1; }
    }

    @keyframes fabFloat {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-3px); }
    }

    @keyframes overlayFadeIn {
        from {
            opacity: 0;
            backdrop-filter: blur(0px);
            -webkit-backdrop-filter: blur(0px);
        }
        to {
            opacity: 1;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
    }

    @keyframes touchRippleExpand {
        to {
            transform: scale(2);
            opacity: 0;
        }
    }

    @keyframes particleFloat {
        0% {
            transform: scale(0) rotate(0deg);
            opacity: 1;
        }
        100% {
            transform: scale(2) rotate(180deg);
            opacity: 0;
        }
    }

    /* Haptic feedback визуальный */
    @keyframes hapticPulse {
        0% { transform: scale(1); }
        50% { transform: scale(0.98); }
        100% { transform: scale(1); }
    }

    /* Улучшенные комментарии для мобильных */
    .comments-area {
        margin: 2rem 0.5rem 0 !important;
        padding: 1.5rem !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
    }

    .comment {
        padding: 1.25rem !important;
        border-radius: 12px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .comment::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, 
            #28B76B, #667eea, #764ba2, #f093fb);
        background-size: 300% 100%;
        animation: cardBorderFlow 5s ease infinite;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .comment:active::before {
        opacity: 1;
    }

    .comment:active {
        transform: scale(0.98) !important;
        box-shadow: 0 4px 15px rgba(40, 183, 107, 0.2) !important;
    }

    .comment-respond {
        margin: 2rem 0.5rem 0 !important;
        padding: 1.5rem !important;
        border-radius: 16px !important;
        background: linear-gradient(135deg, 
            rgba(248, 250, 252, 0.95) 0%, 
            rgba(241, 245, 249, 0.95) 100%) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }

    .comment-form input,
    .comment-form textarea {
        padding: 14px 16px !important;
        border-radius: 10px !important;
        border: 2px solid rgba(226, 232, 240, 0.8) !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        font-size: 16px !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .comment-form input:focus,
    .comment-form textarea:focus {
        border-color: #28B76B !important;
        background: rgba(255, 255, 255, 1) !important;
        transform: translateY(-2px) !important;
        box-shadow: 
            0 0 0 3px rgba(40, 183, 107, 0.1) !important,
            0 8px 25px rgba(40, 183, 107, 0.15) !important;
    }

    .submit {
        width: 100% !important;
        padding: 16px 24px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #28B76B, #22A55B) !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        position: relative !important;
        overflow: hidden !important;
        border: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .submit::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255,255,255,0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.4s ease, height 0.4s ease;
        z-index: 1;
    }

    .submit:active::before {
        width: 300px;
        height: 300px;
    }

    .submit:active {
        transform: scale(0.96) !important;
        box-shadow: 0 6px 20px rgba(40, 183, 107, 0.4) !important;
    }

    .comment-reply-link {
        padding: 10px 16px !important;
        border-radius: 10px !important;
        font-size: 14px !important;
        position: relative !important;
        overflow: hidden !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .comment-reply-link:active {
        transform: scale(0.95) !important;
        box-shadow: 0 4px 15px rgba(40, 183, 107, 0.3) !important;
    }

    /* Touch ripple для кнопок комментариев */
    .submit,
    .comment-reply-link {
        position: relative !important;
        overflow: hidden !important;
    }

    /* Floating labels эффект */
    .comment-form-author,
    .comment-form-email,
    .comment-form-url,
    .comment-form-comment {
        position: relative !important;
    }

    .comment-form label {
        position: absolute !important;
        top: 14px !important;
        left: 16px !important;
        color: #6b7280 !important;
        transition: all 0.3s ease !important;
        pointer-events: none !important;
        background: transparent !important;
        z-index: 2 !important;
    }

    .comment-form input:focus + label,
    .comment-form textarea:focus + label,
    .comment-form input:not(:placeholder-shown) + label,
    .comment-form textarea:not(:placeholder-shown) + label {
        top: -8px !important;
        left: 12px !important;
        font-size: 12px !important;
        color: #28B76B !important;
        background: white !important;
        padding: 0 4px !important;
    }

    /* Улучшенная навигация комментариев */
    .comment .children {
        margin-left: 1rem !important;
        padding-left: 1rem !important;
        border-left: 2px solid rgba(40, 183, 107, 0.2) !important;
        position: relative !important;
    }

    .comment .children::before {
        content: '';
        position: absolute;
        left: -2px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(180deg, 
            rgba(40, 183, 107, 0.6),
            rgba(40, 183, 107, 0.1));
        animation: activePulse 3s ease-in-out infinite;
    }

    /* Comment avatars enhancement */
    .comment-author .avatar {
        border: 2px solid #28B76B !important;
        box-shadow: 0 4px 12px rgba(40, 183, 107, 0.2) !important;
        transition: all 0.3s ease !important;
    }

    .comment:active .comment-author .avatar {
        transform: scale(1.05) !important;
        box-shadow: 0 6px 20px rgba(40, 183, 107, 0.3) !important;
    }

    /* Поддержка темной темы */
    @media (prefers-color-scheme: dark) {
        .sidebar {
            background: linear-gradient(180deg, 
                rgba(45, 54, 63, 0.95) 0%, 
                rgba(26, 31, 46, 0.95) 100%) !important;
        }

        .nav-link {
            color: rgba(255, 255, 255, 0.9) !important;
        }

        .nav-link:active {
            background: rgba(40, 183, 107, 0.2) !important;
        }

        .comments-area {
            background: rgba(31, 41, 55, 0.95) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
        }

        .comment {
            background: rgba(55, 65, 81, 0.8) !important;
            border-color: rgba(75, 85, 99, 0.5) !important;
        }

        .comment-respond {
            background: linear-gradient(135deg, 
                rgba(55, 65, 81, 0.95) 0%, 
                rgba(31, 41, 55, 0.95) 100%) !important;
        }

        .comment-form input,
        .comment-form textarea {
            background: rgba(31, 41, 55, 0.9) !important;
            border-color: rgba(75, 85, 99, 0.6) !important;
            color: rgba(249, 250, 251, 0.9) !important;
        }

        .comment-form input:focus,
        .comment-form textarea:focus {
            background: rgba(31, 41, 55, 1) !important;
            border-color: #28B76B !important;
        }
    }

    /* Улучшенный футер для мобильных */
    .site-footer {
        margin-left: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15) !important;
        overflow: hidden !important;
    }

    .footer-main {
        padding: 2rem 0 1.5rem !important;
    }

    .footer-container {
        padding: 0 1rem !important;
        gap: 2rem !important;
        grid-template-columns: 1fr !important;
    }

    .footer-logo {
        font-size: 1.25rem !important;
    }

    .footer-logo-icon {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }

    .footer-social {
        gap: 0.75rem !important;
        flex-wrap: wrap !important;
    }

    .social-link {
        padding: 12px 16px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        position: relative !important;
        overflow: hidden !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .social-link:active {
        transform: scale(0.95) !important;
        background: rgba(40, 183, 107, 0.15) !important;
    }

    .footer-title {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .footer-link,
    .footer-category-link {
        padding: 12px 8px !important;
        border-radius: 8px !important;
        font-size: 15px !important;
        transition: all 0.3s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .footer-link:active,
    .footer-category-link:active {
        background: rgba(40, 183, 107, 0.1) !important;
        transform: scale(0.98) !important;
    }

    .footer-bottom {
        padding: 1rem 0 !important;
    }

    .footer-bottom-content {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
        padding: 0 1rem !important;
    }

    .footer-extra {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .footer-extra-link {
        padding: 8px 12px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .footer-extra-link:active {
        background: rgba(40, 183, 107, 0.1) !important;
        border-color: #28B76B !important;
        transform: scale(0.95) !important;
    }

    .theme-toggle {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 2px solid rgba(255, 255, 255, 0.12) !important;
        position: relative !important;
        overflow: hidden !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .theme-toggle::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(40, 183, 107, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
    }

    .theme-toggle:active::before {
        width: 60px;
        height: 60px;
    }

    .theme-toggle:active {
        transform: scale(0.9) !important;
        background: rgba(40, 183, 107, 0.15) !important;
        border-color: #28B76B !important;
    }

    .contact-item {
        padding: 12px 8px !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .contact-item:active {
        background: rgba(40, 183, 107, 0.05) !important;
        transform: scale(0.98) !important;
    }

    /* Footer gradient animation enhancement */
    .site-footer::before {
        height: 6px !important;
        background: linear-gradient(90deg, 
            #28B76B 0%, 
            #667eea 25%, 
            #764ba2 50%, 
            #f093fb 75%, 
            #28B76B 100%) !important;
        background-size: 400% 100% !important;
        animation: gradientMove 8s ease infinite !important;
    }

    /* Enhanced category hover effects */
    .footer-category-link {
        position: relative !important;
        overflow: hidden !important;
    }

    .footer-category-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(40, 183, 107, 0.1), 
            transparent);
        transition: left 0.4s ease;
    }

    .footer-category-link:active::before {
        left: 100%;
    }

    /* Улучшенная кнопка "наверх" для мобильных */
    .scroll-to-top {
        width: 52px !important;
        height: 52px !important;
        bottom: calc(1.5rem + env(safe-area-inset-bottom, 0)) !important;
        right: 1.5rem !important;
        background: linear-gradient(135deg, #28B76B, #22A55B) !important;
        box-shadow: 0 8px 25px rgba(40, 183, 107, 0.4) !important;
        border-radius: 16px !important;
        position: relative !important;
        overflow: hidden !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .scroll-to-top::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255,255,255,0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        z-index: 1;
    }

    .scroll-to-top:active::before {
        width: 70px;
        height: 70px;
    }

    .scroll-to-top:active {
        transform: scale(0.9) !important;
        box-shadow: 0 6px 20px rgba(40, 183, 107, 0.6) !important;
    }

    .scroll-to-top.visible {
        animation: fabFloat 3s ease-in-out infinite !important;
    }

    /* Улучшенная мобильная навигация */
    .sidebar {
        background: linear-gradient(180deg, 
            rgba(255,255,255,0.98) 0%, 
            rgba(248,250,252,0.98) 100%) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-right: none !important;
        box-shadow: 
            4px 0 25px rgba(0,0,0,0.15) !important,
            inset -1px 0 0 rgba(40, 183, 107, 0.1) !important;
    }

    .sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, 
            #28B76B 0%, 
            #667eea 33%, 
            #764ba2 66%, 
            #f093fb 100%);
        background-size: 300% 100%;
        animation: gradientMove 6s ease infinite;
        z-index: 1;
    }

    .sidebar.open {
        animation: slideInMagicMobile 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    @keyframes slideInMagicMobile {
        0% {
            transform: translateX(-100%);
            opacity: 0;
        }
        50% {
            opacity: 0.7;
        }
        100% {
            transform: translateX(0);
            opacity: 1;
        }
    }

    /* Мобильные секции навигации */
    .sidebar .nav-section {
        position: relative !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1rem !important;
    }

    .sidebar .nav-section-title {
        background: rgba(40, 183, 107, 0.05) !important;
        padding: 8px 12px !important;
        border-radius: 8px !important;
        margin-bottom: 0.75rem !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .sidebar .nav-section-title::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(40, 183, 107, 0.1), 
            transparent);
        animation: sectionShimmer 3s ease infinite;
    }

    @keyframes sectionShimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }

    /* Улучшенные ссылки навигации */
    .sidebar .nav-link {
        background: rgba(255, 255, 255, 0.7) !important;
        border: 1px solid rgba(226, 232, 240, 0.5) !important;
        margin: 0 0 6px 0 !important;
        border-radius: 12px !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
        position: relative !important;
        overflow: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }

    .sidebar .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(40, 183, 107, 0.15), 
            transparent);
        transition: left 0.4s ease;
    }

    .sidebar .nav-link:active::before {
        left: 100%;
    }

    .sidebar .nav-link:active {
        transform: scale(0.98) !important;
        background: rgba(40, 183, 107, 0.1) !important;
        border-color: rgba(40, 183, 107, 0.3) !important;
        box-shadow: 
            0 4px 15px rgba(40, 183, 107, 0.2) !important,
            inset 0 1px 0 rgba(255,255,255,0.3) !important;
    }

    .sidebar .nav-link.active {
        background: linear-gradient(135deg, 
            rgba(40, 183, 107, 0.15) 0%, 
            rgba(40, 183, 107, 0.08) 100%) !important;
        border-color: rgba(40, 183, 107, 0.4) !important;
        color: #166534 !important;
        font-weight: 600 !important;
        box-shadow: 
            0 6px 20px rgba(40, 183, 107, 0.25) !important,
            inset 0 1px 0 rgba(255,255,255,0.4) !important;
    }

    .sidebar .nav-link.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, #28B76B, #22A55B);
        border-radius: 0 2px 2px 0;
        animation: activePulse 2s ease-in-out infinite;
    }

    /* Улучшенные подменю */
    .sidebar .nav-submenu {
        background: rgba(248, 250, 252, 0.8) !important;
        border-radius: 8px !important;
        margin: 8px 0 0 1rem !important;
        padding: 8px !important;
        border-left: 3px solid rgba(40, 183, 107, 0.3) !important;
        backdrop-filter: blur(5px) !important;
        -webkit-backdrop-filter: blur(5px) !important;
    }

    .sidebar .nav-sublink {
        background: rgba(255, 255, 255, 0.8) !important;
        border: 1px solid rgba(226, 232, 240, 0.3) !important;
        border-radius: 8px !important;
        margin: 4px 0 !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
    }

    .sidebar .nav-sublink:active {
        transform: scale(0.97) !important;
        background: rgba(40, 183, 107, 0.08) !important;
        border-color: rgba(40, 183, 107, 0.2) !important;
    }

    /* Кнопки переключения подменю */
    .sidebar .nav-toggle {
        background: rgba(40, 183, 107, 0.1) !important;
        border: 1px solid rgba(40, 183, 107, 0.2) !important;
        border-radius: 6px !important;
        transition: all 0.3s ease !important;
    }

    .sidebar .nav-toggle:active {
        background: rgba(40, 183, 107, 0.2) !important;
        transform: scale(0.9) !important;
    }

    .sidebar .nav-toggle-icon {
        color: #28B76B !important;
        transition: all 0.3s ease !important;
    }

    .sidebar .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
        transform: rotate(90deg) !important;
        color: #166534 !important;
    }

    /* Touch ripple для мобильной навигации */
    .sidebar .nav-link,
    .sidebar .nav-sublink,
    .sidebar .nav-toggle {
        position: relative !important;
        overflow: hidden !important;
    }

    /* Floating hint для свайпа */
    .sidebar::after {
        content: '← Swipe';
        position: absolute;
        top: 50%;
        right: -60px;
        transform: translateY(-50%);
        background: rgba(40, 183, 107, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 20px 0 0 20px;
        font-size: 12px;
        font-weight: 500;
        opacity: 0;
        animation: swipeHint 4s ease infinite;
        z-index: 10;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    @keyframes swipeHint {
        0%, 85%, 100% { opacity: 0; transform: translateY(-50%) translateX(0); }
        15%, 70% { opacity: 1; transform: translateY(-50%) translateX(-10px); }
    }

    /* Accessibility - отключение анимаций при необходимости */
    @media (prefers-reduced-motion: reduce) {
        .article-header,
        .post-card,
        .nav-link,
        .btn,
        .post-thumbnail,
        .mobile-fab {
            animation: none !important;
            transition: opacity 0.2s ease !important;
        }
    }
}

/* Дополнительные эффекты для очень маленьких экранов */
@media screen and (max-width: 480px) {
    .mobile-fab {
        width: 50px;
        height: 50px;
        font-size: 18px;
        bottom: calc(15px + env(safe-area-inset-bottom, 15px));
        right: 15px;
    }

    .touch-particle {
        width: 4px;
        height: 4px;
    }

    .pull-indicator {
        font-size: 13px;
        padding: 6px 12px;
    }
}