/**
 * 👥 СООБЩЕСТВО CSS - Точно по концепту! (✅ ИСПРАВЛЕН СКРОЛЛИНГ И АНИМАЦИИ)
 * Стили для CommunityPage в соответствии с концептами
 * ✅ ИСПРАВЛЕНО: Убраны автозапускающиеся анимации, оставлены только контролируемые
 * 🔧 ROLLBACK: Removed .content override - using base.css fixed height model
 */

/* ============================================================================
   📄 КОНТЕНТ СООБЩЕСТВА
   ============================================================================ */

/* 🔧 ROLLBACK: .content styles moved to base.css for consistent scroll behavior across all pages */
/* Using base.css .content with fixed height: calc(100vh - var(--bottom-nav-height)) */

/* ============================================================================
   👥 ОСНОВНЫЕ СТИЛИ СООБЩЕСТВА
   ============================================================================ */

/* Стили табов наследуются из diary.css */

/* ============================================================================
   📊 СТАТИСТИКА СООБЩЕСТВА (ИЗ ДОПОЛНИТЕЛЬНОГО КОНЦЕПТА!)
   ============================================================================ */

.community-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.community-stat-card {
    background: var(--surface, #FFFFFF);
    border-radius: var(--border-radius, 12px);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border, #E6E0D6);
    transition: all var(--transition-normal, 0.3s ease);
}

.community-stat-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color, #D2452C);
    margin-bottom: 4px;
    transition: color var(--transition-normal, 0.3s ease);
}

.community-stat-label {
    font-size: 10px;
    color: var(--text-secondary, #666666);
    font-weight: 500;
    transition: color var(--transition-normal, 0.3s ease);
}

/* ============================================================================
   🏆 NEW LEADERBOARD DESIGN (TOP 3 ONLY)
   ============================================================================ */

.leaders-week-section {
    margin-bottom: var(--spacing-lg);
}

.leaders-week-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    text-align: center;
}

/* When inside spotlight-header, adjust alignment */
.spotlight-header .leaders-week-title {
    text-align: left;
    margin-bottom: 0;
}

.leaders-week-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0;
}

.spotlight-header .leaders-week-subtitle {
    text-align: left;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.leaderboard-item {
    background: var(--surface, #FFFFFF);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
    transition: all var(--transition-normal, 0.3s ease);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.leaderboard-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color-strong, rgba(210, 69, 44, 0.12));
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border-light);
}

.leader-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.leader-avatar.fallback .leader-avatar-img {
    display: none;
}

.leader-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: 50%;
}

.leader-info {
    flex: 1;
}

.leader-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2xs);
}

.leader-stats {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ============================================================================
   ⭐ POPULAR QUOTES WEEK SECTION (SPOTLIGHT-STYLE)
   ============================================================================ */

.popular-quotes-week-section {
    margin-bottom: var(--spacing-lg);
}

.popular-quotes-week-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
}

/* When inside spotlight-header, adjust spacing */
.spotlight-header .popular-quotes-week-title {
    margin-bottom: 0;
}

.popular-quotes-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.popular-quote-card {
    background: var(--surface, #FFFFFF);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
    transition: all var(--transition-normal, 0.3s ease);
}

.popular-quote-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color-strong, rgba(210, 69, 44, 0.12));
}

.quote-card__creator {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--spacing-2xs);
    font-style: italic;
}

.favorites-count {
    font-weight: 600;
    color: var(--primary-color);
}

/* ============================================================================
   🎯 USER PROGRESS SECTION
   ============================================================================ */

.user-progress-section {
    margin-bottom: var(--spacing-lg);
    background: var(--surface, #FFFFFF);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
}

.progress-header {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.progress-stats {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--background-light, #F5F5F5);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.progress-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
}
    flex-shrink: 0;
}

.rank-badge.gold {
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.rank-badge.silver {
    background: linear-gradient(45deg, #C0C0C0, #A8A8A8);
}

.rank-badge.bronze {
    background: linear-gradient(45deg, #CD7F32, #B8860B);
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #2D2D2D);
    margin-bottom: 2px;
    transition: color var(--transition-normal, 0.3s ease);
}

.user-stats {
    font-size: 10px;
    color: var(--text-secondary, #666666);
    transition: color var(--transition-normal, 0.3s ease);
}

.user-achievement {
    font-size: 10px;
    color: var(--primary-color, #D2452C);
    font-weight: 500;
    transition: color var(--transition-normal, 0.3s ease);
}

/* ============================================================================
   📝 MVP ЭЛЕМЕНТЫ СООБЩЕСТВА (ТОЧНО ИЗ КОНЦЕПТА!)
   ============================================================================ */

.mvp-community-item {
    background: var(--surface, #FFFFFF);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
    transition: all var(--transition-normal, 0.3s ease);
}

.mvp-community-title {
    font-size: 11px;
    color: var(--primary-color, #D2452C);
    margin-bottom: 6px;
    font-weight: 600;
    transition: color var(--transition-normal, 0.3s ease);
}

.mvp-community-text {
    font-style: italic;
    font-size: 12px;
    color: var(--text-primary, #2D2D2D);
    margin-bottom: 4px;
    line-height: 1.3;
    transition: color var(--transition-normal, 0.3s ease);
}

.mvp-community-author {
    font-size: 10px;
    color: var(--text-muted, #999999);
    transition: color var(--transition-normal, 0.3s ease);
}

/* ============================================================================
   📈 ПРОГРЕСС БАР (ИЗ ДОПОЛНИТЕЛЬНОГО КОНЦЕПТА!)
   ============================================================================ */

.progress-bar {
    background: var(--background-light, #FAF8F3);
    border-radius: 10px;
    height: 6px;
    margin: 8px 0;
    overflow: hidden;
    border: 1px solid var(--border-light, #F0EBE3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #D2452C), var(--primary-light, #E85A42));
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ============================================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================================ */

@media (max-width: 480px) {
    .content {
        padding: 12px;
    }
    
    .community-stats-grid {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .community-stat-card {
        padding: 10px;
    }
    
    .community-stat-number {
        font-size: 16px;
    }
    
    .community-stat-label {
        font-size: 9px;
    }
    
    .leaderboard-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .rank-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .user-name {
        font-size: 11px;
    }
    
    .user-stats,
    .user-achievement {
        font-size: 9px;
    }
    
    .mvp-community-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .mvp-community-title {
        font-size: 10px;
    }
    
    .mvp-community-text {
        font-size: 11px;
    }
    
    .mvp-community-author {
        font-size: 9px;
    }
}

/* ============================================================================
   ✨ КОНТРОЛИРУЕМЫЕ АНИМАЦИИ (✅ ИСПРАВЛЕНО!)
   ============================================================================ */

/* ✅ ИСПРАВЛЕНО: Убраны автозапускающиеся анимации */
/* Анимации теперь запускаются только через Router при переходах */

/* Контролируемые анимации для Router */
.animate-content .mvp-community-item {
    animation: communitySlideIn 0.4s ease;
    animation-fill-mode: both;
}

.animate-content .leaderboard-item {
    animation: communitySlideIn 0.4s ease;
    animation-fill-mode: both;
}

.animate-content .community-stat-card {
    animation: communitySlideIn 0.4s ease;
    animation-fill-mode: both;
}

.animate-content .currently-studying-item {
    animation: communitySlideIn 0.4s ease;
    animation-fill-mode: both;
}

/* ✅ НОВОЕ: Анимации для карточек цитат */
.animate-content .quote-card {
    animation: communitySlideIn 0.4s ease;
    animation-fill-mode: both;
}

/* Отключение анимаций при флаге no-animations */
.no-animations .mvp-community-item,
.no-animations .leaderboard-item,
.no-animations .community-stat-card,
.no-animations .currently-studying-item,
.no-animations .quote-card {
    animation: none !important;
}

/* Задержки анимации для последовательного появления */
.animate-content .mvp-community-item:nth-child(1) { animation-delay: 0.1s; }
.animate-content .mvp-community-item:nth-child(2) { animation-delay: 0.2s; }
.animate-content .mvp-community-item:nth-child(3) { animation-delay: 0.3s; }
.animate-content .mvp-community-item:nth-child(4) { animation-delay: 0.4s; }
.animate-content .mvp-community-item:nth-child(5) { animation-delay: 0.5s; }

.animate-content .leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.animate-content .leaderboard-item:nth-child(2) { animation-delay: 0.2s; }
.animate-content .leaderboard-item:nth-child(3) { animation-delay: 0.3s; }

.animate-content .currently-studying-item:nth-child(1) { animation-delay: 0.1s; }
.animate-content .currently-studying-item:nth-child(2) { animation-delay: 0.2s; }
.animate-content .currently-studying-item:nth-child(3) { animation-delay: 0.3s; }

.animate-content .community-stat-card:nth-child(1) { animation-delay: 0.05s; }
.animate-content .community-stat-card:nth-child(2) { animation-delay: 0.1s; }
.animate-content .community-stat-card:nth-child(3) { animation-delay: 0.15s; }
.animate-content .community-stat-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes communitySlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   🎯 TOUCH-FRIENDLY ЭФФЕКТЫ (HOVERLESS UX)
   ============================================================================ */

/* ✅ ОБНОВЛЕНО: Только touch-based interactions для мобильных */
.mvp-community-item {
    transition: all var(--transition-normal, 0.3s ease);
    will-change: transform;
}

.mvp-community-item:active {
    transform: scale(0.98);
    background: var(--surface-pressed, rgba(210, 69, 44, 0.05));
}

.leaderboard-item {
    transition: all var(--transition-normal, 0.3s ease);
    will-change: transform;
}

.leaderboard-item:active {
    transform: scale(0.98);
    background: var(--surface-pressed, rgba(210, 69, 44, 0.05));
}

.community-stat-card {
    transition: all var(--transition-normal, 0.3s ease);
    will-change: transform;
}

.community-stat-card:active {
    transform: scale(0.98);
    background: var(--surface-pressed, rgba(210, 69, 44, 0.05));
}

.currently-studying-item {
    transition: all var(--transition-normal, 0.3s ease);
    will-change: transform;
}

.currently-studying-item:active {
    transform: scale(0.98);
    background: var(--surface-pressed, rgba(210, 69, 44, 0.05));
}

/* Hover эффекты только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mvp-community-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px var(--shadow-color-strong, rgba(210, 69, 44, 0.15));
    }
    
    .leaderboard-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px var(--shadow-color-strong, rgba(210, 69, 44, 0.15));
    }
    
    .community-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px var(--shadow-color-strong, rgba(210, 69, 44, 0.15));
    }
    
    .currently-studying-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px var(--shadow-color-strong, rgba(210, 69, 44, 0.15));
    }
}

/* ============================================================================
   🔄 СОСТОЯНИЯ ЗАГРУЗКИ, ПУСТО И ОШИБОК (PR-3)
   ============================================================================ */

/* Skeleton загрузка */
.skeleton {
    background: linear-gradient(90deg, 
        var(--border-light, #F0EBE3) 25%, 
        var(--background-light, #FAF8F3) 50%, 
        var(--border-light, #F0EBE3) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--border-radius, 8px);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-title {
    height: 16px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
}

/* ✅ НОВОЕ: Специфичные skeleton для community карточек */
.skeleton-community-item {
    background: var(--surface, #FFFFFF);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border, #E6E0D6);
}

.skeleton-community-title {
    height: 14px;
    width: 40%;
    margin-bottom: 8px;
}

.skeleton-community-text {
    height: 18px;
    width: 90%;
    margin-bottom: 6px;
}

.skeleton-community-text.short {
    width: 70%;
}

.skeleton-community-author {
    height: 12px;
    width: 50%;
}

.skeleton-stat-card {
    background: var(--surface, #FFFFFF);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border, #E6E0D6);
}

.skeleton-stat-number {
    height: 20px;
    width: 60%;
    margin: 0 auto 6px auto;
}

.skeleton-stat-label {
    height: 12px;
    width: 80%;
    margin: 0 auto;
}

.skeleton-leaderboard-item {
    background: var(--surface, #FFFFFF);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border, #E6E0D6);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.skeleton-user-info {
    flex: 1;
}

.skeleton-user-name {
    height: 14px;
    width: 40%;
    margin-bottom: 4px;
}

.skeleton-user-stats {
    height: 10px;
    width: 60%;
}

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

/* Состояние загрузки */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light, #F0EBE3);
    border-top: 3px solid var(--primary-color, #D2452C);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary, #666666);
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Пустое состояние */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: var(--surface, #FFFFFF);
    border-radius: 12px;
    border: 1px solid var(--border, #E6E0D6);
    margin-bottom: 16px;
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #2D2D2D);
    margin-bottom: 8px;
}

.empty-description {
    font-size: 14px;
    color: var(--text-secondary, #666666);
    line-height: 1.4;
}

/* Состояние ошибки */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: var(--surface, #FFFFFF);
    border-radius: 12px;
    border: 1px solid var(--error-color, #F44336);
    margin-bottom: 16px;
}

.error-icon {
    font-size: 32px;
    color: var(--error-color, #F44336);
    margin-bottom: 16px;
}

.error-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--error-color, #F44336);
    margin-bottom: 8px;
}

.error-description {
    font-size: 14px;
    color: var(--text-secondary, #666666);
    line-height: 1.4;
    margin-bottom: 16px;
}

.error-retry-btn {
    background: var(--error-color, #F44336);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal, 0.3s ease);
    min-height: 44px; /* Touch-friendly */
}

.error-retry-btn:hover {
    background: var(--error-color, #F44336);
    opacity: 0.9;
}

.error-retry-btn:active {
    transform: scale(0.98);
}

/* ============================================================================
   🌙 ТЕМНАЯ ТЕМА АДАПТАЦИЯ
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .community-stat-card {
        box-shadow: 0 2px 8px rgba(232, 90, 66, 0.12);
    }
    
    .leaderboard-item {
        box-shadow: 0 2px 8px rgba(232, 90, 66, 0.12);
    }
    
    .mvp-community-item {
        box-shadow: 0 2px 8px rgba(232, 90, 66, 0.12);
    }
    
    .community-stat-card:hover,
    .leaderboard-item:hover,
    .mvp-community-item:hover {
        box-shadow: 0 4px 16px rgba(232, 90, 66, 0.20);
    }

    /* Темная тема для состояний */
    .skeleton {
        background: linear-gradient(90deg, 
            var(--border-dark, #404040) 25%, 
            var(--bg-secondary, #2D2D2D) 50%, 
            var(--border-dark, #404040) 75%);
    }

    .loading-spinner {
        border-color: var(--border-dark, #404040);
        border-top-color: var(--primary-color, #E5674F);
    }

    .loading-text {
        color: var(--text-secondary, #E0E0E0);
    }

    .empty-state,
    .error-state {
        background: var(--bg-card, #3A3A3A);
        border-color: var(--border, #404040);
    }

    .empty-title {
        color: var(--text-primary, #FFFFFF);
    }

    .empty-description {
        color: var(--text-secondary, #E0E0E0);
    }

    .error-title {
        color: var(--error-color, #FF6B6B);
    }

    .error-description {
        color: var(--text-secondary, #E0E0E0);
    }

    .error-retry-btn {
        background: var(--error-color, #FF6B6B);
    }
    
    /* Темная тема для новых элементов */
    .community-stats-overview,
    .content-section,
    .leaders-week-section,
    .popular-quotes-section,
    .popular-books-section,
    .stats-detail-section,
    .user-rating-section {
        background: var(--bg-card, #3A3A3A);
        border-color: var(--border, #404040);
        box-shadow: 0 2px 8px rgba(232, 90, 66, 0.12);
    }
    
    .community-stats-title,
    .content-section-title,
    .leaders-week-title,
    .popular-quotes-title,
    .popular-books-title,
    .stats-detail-title,
    .user-rating-title {
        color: var(--primary-color, #E5674F);
    }
    
    .content-section-subtitle,
    .leaders-week-subtitle,
    .quote-text,
    .quote-meta,
    .book-title-line,
    .book-interest-line,
    .stats-detail-item,
    .user-rating-label,
    .community-stat-small-label {
        color: var(--text-secondary, #E0E0E0);
    }
    
    .quote-item,
    .book-item {
        background: var(--surface-dark, #2D2A26);
        border-color: var(--border-dark, #3D3A36);
    }
}

/* ===== Mobile readable bump (+1px for micro sizes, variables for common sizes) ===== */
@media (hover: none) and (pointer: coarse) {
  .community-stat-label { font-size: 11px; }      /* 10 -> 11 */
  .rank-badge { font-size: 13px; }                /* 12 -> 13 */
  .user-name { font-size: var(--font-size-xs); }  /* 12 -> 13 */
  .user-stats, .user-achievement { font-size: 11px; } /* 10 -> 11 */

  .mvp-community-title { font-size: var(--font-size-xs); } /* 11 -> 13 */
  .mvp-community-text { font-size: var(--font-size-xs); }  /* 12 -> 13 */
  .mvp-community-author { font-size: 11px; }      /* 10 -> 11 */
  
  /* Touch-friendly минимальные размеры для интерактивных элементов */
  .anna-message-block,
  .content-section,
  .leaders-week-section,
  .popular-quotes-section,
  .popular-books-section,
  .user-progress-section,
  .stats-detail-section,
  .user-rating-section,
  .fact-section {
    min-height: 44px;
    cursor: pointer;
  }
  
  .quote-item,
  .book-item {
    min-height: 44px;
    cursor: pointer;
  }
  
  /* Увеличенные шрифты для мобильных устройств */
  .anna-message-header { font-size: 12px; }
  .anna-message-text { font-size: 13px; }
  .anna-message-time { font-size: 11px; }
  
  .community-stats-title { font-size: var(--font-size-xs); }
  .community-stat-value { font-size: 22px; }
  .community-stat-small-label { font-size: 11px; }
  
  .content-section-title,
  .leaders-week-title,
  .popular-quotes-title,
  .popular-books-title,
  .stats-detail-title,
  .user-rating-title { font-size: var(--font-size-xs); }
  
  .content-section-subtitle,
  .leaders-week-subtitle { font-size: 11px; }
  
  .quote-text { font-size: 11px; }
  .quote-meta { font-size: 11px; }
  
  .book-title-line { font-size: 12px; }
  .book-interest-line { font-size: 11px; }
  
  .progress-header { font-size: 12px; }
  .progress-stats { font-size: 11px; }
  .progress-description { font-size: 11px; }
  
  .stats-detail-item { font-size: 12px; }
  
  .user-rating-value { font-size: 18px; }
  .user-rating-label { font-size: 10px; }
  
  .fact-title { font-size: 12px; }
  .fact-text { font-size: 11px; }
}

/* Fallback by width */
@media (max-width: 480px) {
  .community-stat-label { font-size: 11px; }
  .rank-badge { font-size: 13px; }
  .user-name { font-size: var(--font-size-xs); }
  .user-stats, .user-achievement { font-size: 11px; }
  .mvp-community-title { font-size: var(--font-size-xs); }
  .mvp-community-text { font-size: var(--font-size-xs); }
  .mvp-community-author { font-size: 11px; }
  
  /* Новые адаптации для добавленных классов */
  .anna-message-header { font-size: 10px; }
  .anna-message-text { font-size: 11px; }
  .anna-message-time { font-size: 9px; }
  
  .community-stats-title { font-size: 12px; }
  .community-stat-value { font-size: 18px; }
  .community-stat-small-label { font-size: 9px; }
  
  .content-section-title { font-size: 11px; }
  .content-section-subtitle { font-size: 9px; }
  
  .quote-text { font-size: 9px; }
  .quote-meta { font-size: 9px; }
  
  .book-title-line { font-size: 10px; }
  .book-interest-line { font-size: 9px; }
  
  .progress-header { font-size: 10px; }
  .progress-stats { font-size: 9px; }
  .progress-description { font-size: 9px; }
  
  .stats-detail-title { font-size: 11px; }
  .stats-detail-item { font-size: 10px; }
  
  .user-rating-title { font-size: 11px; }
  .user-rating-value { font-size: 14px; }
  .user-rating-label { font-size: 8px; }
  
  .fact-title { font-size: 10px; }
  .fact-text { font-size: 9px; }
}

/* ============================================================================
   💬 СООБЩЕНИЯ ОТ АННЫ (ГРАДИЕНТНЫЕ БЛОКИ)
   ============================================================================ */

.anna-message-block {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.anna-message-header {
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: 500;
}

.anna-message-text {
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.anna-message-time {
    font-size: 10px;
    opacity: 0.8;
}

/* ============================================================================
   📊 РАСШИРЕННАЯ СТАТИСТИКА СООБЩЕСТВА
   ============================================================================ */

.community-stats-overview {
    background: var(--surface);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.community-stats-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-primary);
    text-align: center;
}

.community-stats-2x2-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.community-stat-big {
    text-align: center;
}

.community-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.community-stat-small-label {
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============================================================================
   🏆 ЛИДЕРЫ И СЕКЦИИ КОНТЕНТА
   ============================================================================ */

.content-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.content-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
    text-align: center;
}

.content-section-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

.leaders-week-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.leaders-week-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.leaders-week-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============================================================================
   ⭐ ПОПУЛЯРНЫЕ ЦИТАТЫ
   ============================================================================ */

.popular-quotes-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px;
    margin: 16px 0;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.popular-quotes-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: center;
}

.quote-item {
    background: var(--background-light);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
}

.quote-text {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 4px;
}

.quote-meta {
    font-size: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================================================
   📚 ПОПУЛЯРНЫЕ РАЗБОРЫ 
   ============================================================================ */

.popular-books-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px;
    margin: 16px 0;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.popular-books-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: center;
}

.book-item {
    background: var(--background-light);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
}

.book-title-line {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.book-interest-line {
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============================================================================
   🎯 ПРОГРЕСС И ДОСТИЖЕНИЯ
   ============================================================================ */

.user-progress-section {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    padding: 12px;
    margin-top: 16px;
}

.progress-header {
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: 600;
}

.progress-stats {
    font-size: 10px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.progress-description {
    font-size: 10px;
    opacity: 0.9;
}

.progress-bar-white {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 6px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-fill-white {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ============================================================================
   🎨 ДЕТАЛЬНАЯ СТАТИСТИКА ТАБОВ
   ============================================================================ */

.stats-detail-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.stats-detail-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stats-detail-item {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stats-detail-item:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   🏆 РЕЙТИНГ ПОЛЬЗОВАТЕЛЯ
   ============================================================================ */

.user-rating-section {
    background: var(--surface);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.user-rating-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.user-rating-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.user-rating-item {
    text-align: center;
}

.user-rating-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.user-rating-label {
    font-size: 9px;
    color: var(--text-secondary);
}

/* ============================================================================
   ✨ ИНТЕРЕСНЫЕ ФАКТЫ
   ============================================================================ */

.fact-section {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px;
    padding: 12px;
}

.fact-title {
    font-size: 11px;
    margin-bottom: 6px;
    font-weight: 600;
    text-align: center;
}

.fact-text {
    font-size: 10px;
    opacity: 0.9;
    text-align: center;
    line-height: 1.3;
}

/* ============================================================================
   📚 СЕКЦИЯ "СЕЙЧАС ИЗУЧАЮТ" (НОВАЯ ИНТЕГРАЦИЯ СО STATISTICSSERVICE)
   ============================================================================ */

.currently-studying-section {
    margin-bottom: 16px;
}

.currently-studying-section .mvp-community-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.currently-studying-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.currently-studying-item {
    background: var(--surface, #FFFFFF);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
    transition: all var(--transition-normal, 0.3s ease);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    
    /* Touch-friendly минимальный размер 44px */
    min-height: 44px;
}

.currently-studying-item:active {
    transform: scale(0.98);
    background: var(--bg-overlay, rgba(210, 69, 44, 0.05));
}

.studying-rank {
    width: 28px;
    height: 28px;
    background: var(--primary-color, #D2452C);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.studying-content {
    flex: 1;
    min-width: 0; /* Позволяет text-overflow работать */
}

.studying-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #2D2D2D);
    margin-bottom: 2px;
    /* Ellipsis для длинных названий */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studying-author {
    font-size: 11px;
    color: var(--text-secondary, #5D4037);
    margin-bottom: 2px;
    /* Ellipsis для длинных имен авторов */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studying-stats {
    font-size: 10px;
    color: var(--text-muted, #8D6E63);
}

/* Темная тема для "Сейчас изучают" */
@media (prefers-color-scheme: dark) {
    .currently-studying-item {
        background: var(--surface-dark, #2D2A26);
        border-color: var(--border-dark, #3D3A36);
    }
    
    .currently-studying-item:active {
        background: rgba(210, 69, 44, 0.15);
    }
    
    .studying-title {
        color: var(--text-primary-dark, #F5F2EC);
    }
    
    .studying-author {
        color: var(--text-secondary-dark, #C0B8B0);
    }
    
    .studying-stats {
        color: var(--text-muted-dark, #8D847A);
    }
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .studying-title {
        font-size: 12px;
    }
    
    .studying-author {
        font-size: 10px;
    }
    
    .studying-stats {
        font-size: 9px;
    }
}

/* ============================================================================
   💫 ЦИТАТЫ СООБЩЕСТВА (НОВЫЕ СТИЛИ ДЛЯ PR-3)
   ============================================================================ */

.latest-quotes-section {
    margin-bottom: var(--spacing-lg);
}

.quotes-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.quote-card {
    background: var(--surface, #FFFFFF);
    border: 1px solid var(--border, #E6E0D6);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    position: relative;
    transition: var(--transition-normal);
}

.quote-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quote-card__content {
    position: relative;
}

.quote-card__text {
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
}

.quote-card__author {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.quote-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
}

.quote-card__date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.quote-card__add-btn {
    background: var(--primary-color, #D2452C);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 14px;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.quote-card__add-btn.added {
    background: var(--success-color, #28a745);
}

.quote-card__add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-icon {
    line-height: 1;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================================================
   🔔 УВЕДОМЛЕНИЯ (НОВЫЕ ДЛЯ PR-3)
   ============================================================================ */

.notification {
    position: fixed;
    top: var(--safe-area-top, 20px);
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--surface, #FFFFFF);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-index-modal);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid var(--border);
    min-width: 200px;
    max-width: 90vw;
    text-align: center;
    transition: transform var(--duration-normal) var(--ease-out);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification--success {
    background: var(--success-color, #28a745);
    color: white;
    border-color: var(--success-color, #28a745);
}

.notification--error {
    background: var(--error-color, #dc3545);
    color: white;
    border-color: var(--error-color, #dc3545);
}

.notification--info {
    background: var(--info-color, #17a2b8);
    color: white;
    border-color: var(--info-color, #17a2b8);
}

/* ============================================================================
   ✨ SPOTLIGHT СЕКЦИЯ (НОВАЯ)
   ============================================================================ */

.spotlight-section {
    margin-bottom: var(--spacing-md);
    background: var(--surface, #FFFFFF);
    border-radius: 12px;
    padding: var(--spacing-md);
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
    transition: all var(--transition-normal, 0.3s ease);
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.spotlight-card {
    background: var(--surface, #FFFFFF);
    border-radius: 8px;
    padding: var(--spacing-sm);
    border: 1px solid var(--border, #E6E0D6);
    position: relative;
    transition: all var(--transition-normal, 0.3s ease);
}

.spotlight-card:hover {
    box-shadow: 0 4px 12px var(--shadow-color, rgba(210, 69, 44, 0.12));
    transform: translateY(-1px);
}

.spotlight-card--fresh {
    border-left: 3px solid var(--success-color, #28a745);
}

.spotlight-card--fav {
    border-left: 3px solid var(--primary-color, #D2452C);
}

.spotlight-badge {
    position: absolute;
    top: -8px;
    right: var(--spacing-sm);
    background: var(--primary-color, #D2452C);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotlight-card--fresh .spotlight-badge {
    background: var(--success-color, #28a745);
}

.spotlight-text {
    font-style: italic;
    font-size: var(--font-size-sm, 14px);
    color: var(--text-primary, #2D2D2D);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.spotlight-author {
    font-size: var(--font-size-xs, 12px);
    color: var(--text-muted, #999999);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.spotlight-meta {
    font-size: var(--font-size-xs, 12px);
    color: var(--text-secondary, #6C757D);
    margin-bottom: var(--spacing-sm);
}

.spotlight-actions {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: flex-end;
}

.spotlight-actions button {
    min-width: var(--touch-target-min, 44px);
    min-height: var(--touch-target-min, 44px);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-normal, 0.3s ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotlight-actions .quote-card__add-btn {
    background: var(--success-color, #28a745);
    color: white;
}

.spotlight-actions .quote-card__add-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.spotlight-actions .quote-card__heart-btn {
    background: var(--primary-color, #D2452C);
    color: white;
}

/* ============================================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ НОВЫХ ЭЛЕМЕНТОВ
   ============================================================================ */

@media (max-width: 480px) {
    .quotes-grid {
        gap: var(--spacing-sm);
    }
    
    .quote-card {
        padding: var(--spacing-sm);
    }
    
    .quote-card__text {
        font-size: var(--font-size-sm);
    }
    
    .quote-card__meta {
        margin-top: var(--spacing-sm);
    }
    
    .notification {
        font-size: var(--font-size-xs);
        padding: var(--spacing-sm) var(--spacing-md);
        max-width: 95vw;
    }
    
    /* Spotlight mobile optimizations */
    .spotlight-section {
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .spotlight-text {
        font-size: var(--font-size-xs);
    }
    
    .spotlight-author {
        font-size: 11px;
    }
    
    .spotlight-actions button {
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
    }
}

/* ============================================================================
   🎯 TOUCH-FRIENDLY РАЗМЕРЫ (СООТВЕТСТВИЕ ТРЕБОВАНИЯМ)
   ============================================================================ */

.promo-btn {
    min-height: var(--touch-target-min) !important;
    min-width: var(--touch-target-min);
    padding: var(--spacing-sm) var(--spacing-md);
}

.tab {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

.error-retry-btn {
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

/* ============================================================================
   ✨ SPOTLIGHT SECTION STYLES (ВОССТАНОВЛЕННЫЙ СТАРЫЙ ДИЗАЙН)
   ============================================================================ */

.community-spotlight {
    background: var(--surface, #FFFFFF);
    border-radius: var(--radius-lg, 12px);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border, #E6E0D6);
    box-shadow: 0 2px 8px var(--shadow-color, rgba(210, 69, 44, 0.08));
}

.spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.spotlight-title {
    font-size: var(--font-size-sm);
    color: var(--primary-color, #D2452C);
    margin: 0;
    font-weight: 600;
}

.spotlight-refresh-btn {
    background: var(--primary-color, #D2452C);
    color: white;
    border: none;
    border-radius: 50%;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-normal, 0.3s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.spotlight-refresh-btn:hover {
    background: var(--primary-dark, #B33A29);
    transform: scale(1.05);
}

.spotlight-refresh-btn:active {
    transform: scale(0.95);
}

.spotlight-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spotlight-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.quote-card {
    background: var(--surface, #FFFFFF);
    border: 1px solid var(--border, #E6E0D6);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    position: relative;
    transition: var(--transition-normal);
}

.quote-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quote-card__text {
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-style: italic;
}

.quote-card__author {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.quote-card__meta {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.quote-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: 8px;  /* ← ДОБАВИТЬ ЭТУ СТРОКУ! */
}

.quote-card__add-btn,
.quote-card__heart-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    flex-shrink: 0;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 18px;
    position: relative;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;  /* ← ТОЛЬКО background-color! */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

/* ✅ Hover БЕЗ scale - только цвет */
@media (hover: hover) and (pointer: fine) {
    .quote-card__add-btn:hover,
    .quote-card__heart-btn:hover {
        background-color: var(--primary-dark, #B33A29);
    }
}

/* ✅ Active БЕЗ scale - только цвет */
.quote-card__add-btn:active,
.quote-card__heart-btn:active {
    background-color: var(--primary-dark, #B33A29);
}

.quote-card__heart-btn::before {
    content: '';
    width: 20px;
    height: 20px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ✅ ИСПРАВЛЕНО: Правильный цвет + НЕТ transition override */
.quote-card__heart-btn.favorited {
    background: var(--primary-color, #D2452C);  /* ← ТЕРРАКОТОВЫЙ! */
    color: white;
}

.quote-card__heart-btn.favorited::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF' stroke='%23FFFFFF' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

/* Spotlight badge styles */
.spotlight-badge {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    background: var(--primary-color, #D2452C);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotlight-card--fresh .spotlight-badge {
    background: var(--success-color, #28a745);
}

.spotlight-card--fav .spotlight-badge {
    background: var(--accent-color, #E91E63);
}
/* Spin animation for refresh button */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .community-spotlight {
        margin: 0 -4px var(--spacing-md) -4px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .spotlight-grid {
        gap: var(--spacing-sm);
    }
    
    .quote-card__text {
        font-size: var(--font-size-xs);
    }
    
    .quote-card__author {
        font-size: 11px;
    }
}

/* ============================================================================
   🆕 NEW QUOTE CARD LAYOUT STYLES (PR Requirements)
   Added for spotlight and popular quotes redesign
   ============================================================================ */

/* Quote card header with user avatar and name */
.quote-card__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.quote-card__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--text-inverse);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: 50%;
}

.quote-card__user {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.quote-card__user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Quote card footer with likes left and actions right */
.quote-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

.quote-card__likes {
    display: flex;
    align-items: center;
    gap: var(--spacing-2xs);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}


/* Update existing actions to ensure proper touch targets */
.quote-card__add-btn,
.quote-card__heart-btn {
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    border-radius: var(--radius-md);
    font-size: 18px;;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.quote-card__add-btn {
    background: var(--success-color);
    color: var(--text-inverse);
}

.quote-card__heart-btn.favorited {
    background: var(--error-color);
    color: var(--text-inverse);
    border-color: var(--error-color);
}

/* Кнопка подписки тоже фиксированная */
.follow-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: none !important;  /* ← БЕЗ TRANSITION! */
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Кнопка подписки активная - терракотовая */
.follow-btn.following {
    background: var(--primary-color, #D2452C) !important;
    color: white !important;
    border-color: var(--primary-color, #D2452C) !important;
    transition: none !important;
}

/* Hover эффекты */
.follow-btn:hover {
    transform: scale(1.05);
}

.follow-btn:active {
    transform: scale(0.95);
}

/* SVG иконка внутри */
.follow-btn svg {
    width: 20px;
    height: 20px;
}

.follow-btn.following svg {
    stroke: white;
}

/* Progress section text color fix */
.progress-header {
    color: var(--text-inverse) !important; /* Force white text for contrast */
}

.progress-stats {
    color: var(--text-inverse) !important; /* Force white text for contrast */
}

.progress-description {
    color: var(--text-inverse) !important; /* Force white text for contrast */
}

/* Dark mode support for progress text */
@media (prefers-color-scheme: dark) {
    .progress-header,
    .progress-stats,
    .progress-description {
        color: var(--text-primary) !important; /* In dark mode, use primary text color */
    }
}

/* Ensure proper contrast on progress section background */
.user-progress-section {
    background: var(--primary-color) !important; /* Use primary color background for contrast */
    color: var(--text-inverse);
}

@media (prefers-color-scheme: dark) {
    .user-progress-section {
        background: var(--bg-secondary) !important; /* In dark mode, use secondary background */
        color: var(--text-primary);
    }
}

/* Mobile responsiveness for new layout */
@media (max-width: 480px) {
    .quote-card__user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .avatar-initials {
        font-size: var(--font-size-xs);
    }
    
    .quote-card__user-name {
        font-size: var(--font-size-xs);
    }
    
    .quote-card__likes {
        font-size: var(--font-size-xs);
    }
    
    .quote-card__add-btn,
    .quote-card__heart-btn {
        font-size: var(--font-size-xs);
    }
}

/* ============================================================================
   🦴 SKELETON STYLES FOR QUOTE CARDS (REQUIRED FOR SPOTLIGHT)
   ============================================================================ */

/* Skeleton quote card styling - minimal, non-interactive */
.quote-card.skeleton {
    opacity: 0.7;
    pointer-events: none;
    cursor: default;
}

.quote-card.skeleton:hover {
    transform: none;
    box-shadow: none;
}

Открой на GitHub: mini-app/css/pages/community.css
Прокрути В САМЫЙ КОНЕЦ файла
Добавь:

/* =============================================
   FIX: Выравнивание кнопки лайка когда она одна
   ============================================= */

.quote-card__actions .quote-card__heart-btn:only-child {
    margin-top: 0 !important;
}
