/* ==========================================================================
   ======================== GALLERY.CSS / WORKSHOP ==========================
   ========================================================================== */

/* ==========================================================================
   1. КАРТОЧКИ ГАЛЕРЕИ СООБЩЕСТВА
   ========================================================================== */

.community-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.community-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 20%, transparent);
    opacity: 1;
}

.community-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0; 
}

.community-card-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.community-card-author span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.community-card-actions {
    flex-shrink: 0;
}

.community-card-like-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.25rem 0.6rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.community-card-like-btn:hover {
    background-color: #ef4444;
    border-color: #ef4444;
    transform: scale(1.05);
}

.community-card-like-btn svg {
    width: 16px;
    height: 16px;
}

.community-card-like-btn .like-icon-filled { display: none; }
.community-card-like-btn .like-icon-empty { display: block; }
.like-count { font-size: 0.8rem; font-weight: 700; }

.community-card-like-btn.is-active {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.community-card-like-btn.is-active .like-icon-filled { display: block; }
.community-card-like-btn.is-active .like-icon-empty { display: none; }

.community-card-overlay, 
.community-card-prompt, 
.community-card-tags, 
.community-tag {
    display: none !important;
}

/* ==========================================================================
   2. МОДАЛЬНОЕ ОКНО И ПРОМПТЫ
   ========================================================================== */

.modal-prompt-container {
    max-width: 800px;
    width: 90%;
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: opacity 0.3s ease;
}

.prompt-section {
    margin-bottom: 1rem;
}

.prompt-section:last-child {
    margin-bottom: 0;
}

.prompt-section h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-section h6 svg {
    color: var(--accent-color);
}

#modalUserPrompt {
    margin: 0;
    padding-left: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

.modal-prompt-container p[style*="padding-left"] {
    padding-left: 0 !important;
    text-align: left;
}

.modal-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 1.5rem;
}

.prompt-tag-modal {
    padding: 0.25rem 0.75rem;
    background-color: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.mode-display-plate {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-left: 0;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 153, 0, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 0.5rem;
    color: var(--accent-color);
    font-weight: 500;
}

.mode-display-plate svg {
    width: 1.2em;
    height: 1.2em;
}

/* Референсы в модалке */
.modal-references-container {
    max-width: 800px;
    width: 90%;
    margin-top: 1rem;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: none;
    border-radius: 0.5rem;
}

.modal-references-container h6 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.modal-references-container h6 svg {
    color: var(--accent-color);
}

.modal-references-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.modal-reference-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

/* ==========================================================================
   3. СПИННЕРЫ АНИМАЦИИ
   ========================================================================== */

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

.new-spinner-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
}

.spinner-outer-wheel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px; 
    height: 50px;
    transform: translate(-50%, -50%); 
    animation: spin 2s linear infinite;
}

.spinner-inner-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   4. БЕЙДЖИ НЕЙРОСЕТЕЙ И ФОТОСЕССИЯ
   ========================================================================== */

.community-card-model-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.photoshoot-badge-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    padding: 15px;
    background: linear-gradient(145deg, #1a1a1a, #252525);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.photoshoot-badge-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: linear-gradient(to bottom, #FFD700, #FF8C00);
}

.photoshoot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    font-size: 24px;
}

.photoshoot-info h4 {
    margin: 0;
    color: #FFD700;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photoshoot-info p {
    margin: 2px 0 0 0;
    color: #aaa;
    font-size: 0.8rem;
}

/* ==========================================================================
   5. ФИЛЬТРЫ И СПИСКИ АВТОРОВ
   ========================================================================== */

.community-filters-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(15, 18, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: rgba(250, 191, 60, 0.15);
    border-color: rgba(250, 191, 60, 0.4);
    color: #FABF3C;
    box-shadow: 0 0 10px rgba(250, 191, 60, 0.1);
}

/* Выпадающий список авторов */
#community-authors-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#community-authors-list {
    display: block;
    flex-grow: 1;
    margin-top: 10px;
    overflow-y: auto;
}

.authors-arrow-icon {
    display: none;
    color: #888;
    pointer-events: none; 
    transition: transform 0.3s ease, color 0.3s ease;
}

.author-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
}

.author-filter-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.author-filter-item.active {
    background: rgba(250, 191, 60, 0.1);
    border-color: rgba(250, 191, 60, 0.3);
}

.author-filter-avatar {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 50%;
    object-fit: cover;
}

.author-filter-item.active .author-filter-avatar {
    border-color: #FABF3C;
}

.author-filter-name {
    display: flex;
    flex-direction: column;
    color: #ccc;
    font-size: 0.9rem;
}

.author-filter-item.active .author-filter-name {
    color: #fff;
    font-weight: 600;
}

.author-filter-count {
    color: #888;
    font-size: 0.75rem;
    font-weight: normal;
}

.author-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 5px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.author-profile-btn:hover {
    color: #FABF3C;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    #community-authors-view {
        display: block;
        height: auto !important; 
        margin-bottom: 15px;
    }

    .authors-arrow-icon {
        display: block; 
        margin-left: auto;
    }

    #authors-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px; 
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s;
    }

    #authors-mobile-toggle:active {
        background: rgba(255, 255, 255, 0.08);
    }

    #authors-mobile-toggle.open {
        border-color: rgba(250, 191, 60, 0.3);
    }

    #authors-mobile-toggle.open .authors-arrow-icon {
        color: #FABF3C;
        transform: rotate(180deg);
    }

    #community-authors-list {
        position: relative;
        z-index: 100; 
        display: none; 
        max-height: 350px; 
        margin-top: 5px;
        padding: 8px;
        background: #1a1a1a; 
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    #community-authors-list.open {
        display: block;
    }
}

@media (max-width: 576px) {
    .community-filters-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }
    
    .filter-group {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-group::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex-shrink: 0;
        flex-grow: 0;
        text-align: center;
        white-space: nowrap; 
    }
    
    .filter-group .form-select {
        width: 100% !important;
    }
}

/* ==========================================================================
   6. ШАПКА ПРОФИЛЯ ПОЛЬЗОВАТЕЛЯ И СИСТЕМА БЕЙДЖЕЙ
   ========================================================================== */

.public-profile-header {
    grid-column: 1 / -1; 
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    padding: 20px;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.public-profile-avatar {
    width: 80px;
    height: 80px;
    border: 2px solid #FABF3C;
    border-radius: 50%;
    object-fit: cover;
}

.public-profile-info h3 {
    display: flex;
    align-items: center;
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 1.4rem;
}

.public-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #aaa;
    font-size: 0.95rem;
}

.public-profile-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-icon {
    font-size: 1.1rem;
}

/* Стеклянные бейджи */
.profile-badges-wrapper {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px 12px !important;
    margin-top: 12px !important;
}

.user-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-badge-tag:hover {
    transform: translateY(-2px);
    filter: brightness(1.25);
}

/* Цвета бейджей */
.badge-gray { 
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.15), rgba(75, 85, 99, 0.05)); 
    border: 1px solid rgba(156, 163, 175, 0.2); 
    border-top: 1px solid rgba(243, 244, 246, 0.4); 
    color: #e5e7eb; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 0 15px rgba(156, 163, 175, 0.1); 
}

.badge-green { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(4, 120, 87, 0.05)); 
    border: 1px solid rgba(52, 211, 153, 0.3); 
    border-top: 1px solid rgba(167, 243, 208, 0.6); 
    color: #a7f3d0; 
    box-shadow: 0 4px 15px rgba(4, 120, 87, 0.3), inset 0 0 15px rgba(16, 185, 129, 0.15); 
}

.badge-blue { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(29, 78, 216, 0.05)); 
    border: 1px solid rgba(96, 165, 250, 0.3); 
    border-top: 1px solid rgba(191, 219, 254, 0.6); 
    color: #bfdbfe; 
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.3), inset 0 0 15px rgba(59, 130, 246, 0.15); 
}

.badge-cyan { 
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(14, 116, 144, 0.05)); 
    border: 1px solid rgba(34, 211, 238, 0.3); 
    border-top: 1px solid rgba(165, 243, 252, 0.6); 
    color: #a5f3fc; 
    box-shadow: 0 4px 15px rgba(14, 116, 144, 0.3), inset 0 0 15px rgba(6, 182, 212, 0.15); 
}

.badge-purple { 
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(88, 28, 135, 0.05)); 
    border: 1px solid rgba(167, 139, 250, 0.3); 
    border-top: 1px solid rgba(221, 214, 254, 0.6); 
    color: #e9d5ff; 
    box-shadow: 0 4px 15px rgba(88, 28, 135, 0.3), inset 0 0 15px rgba(139, 92, 246, 0.15); 
}

.badge-pink { 
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(157, 23, 77, 0.05)); 
    border: 1px solid rgba(244, 114, 182, 0.3); 
    border-top: 1px solid rgba(251, 207, 232, 0.6); 
    color: #fbcfe8; 
    box-shadow: 0 4px 15px rgba(157, 23, 77, 0.3), inset 0 0 15px rgba(236, 72, 153, 0.15); 
}

.badge-red { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(153, 27, 27, 0.05)); 
    border: 1px solid rgba(248, 113, 113, 0.3); 
    border-top: 1px solid rgba(254, 202, 202, 0.6); 
    color: #fecaca; 
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4), inset 0 0 15px rgba(239, 68, 68, 0.2); 
}

.badge-gold { 
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(133, 77, 14, 0.05)); 
    border: 1px solid rgba(250, 204, 21, 0.4); 
    border-top: 1px solid #fef08a; 
    color: #fef08a; 
    box-shadow: 0 4px 20px rgba(161, 98, 7, 0.4), inset 0 0 20px rgba(234, 179, 8, 0.2); 
}

.badge-rainbow {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(219, 39, 119, 0.1), rgba(234, 88, 12, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    animation: pulseRainbow 4s linear infinite;
}

@keyframes pulseRainbow {
    0%   { box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3), inset 0 0 20px rgba(124, 58, 237, 0.2); border-color: rgba(219, 39, 119, 0.4); border-top-color: #fff; }
    33%  { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4), inset 0 0 20px rgba(59, 130, 246, 0.2); border-color: rgba(124, 58, 237, 0.4); border-top-color: #fff; }
    66%  { box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3), inset 0 0 20px rgba(219, 39, 119, 0.2); border-color: rgba(59, 130, 246, 0.4); border-top-color: #fff; }
    100% { box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3), inset 0 0 20px rgba(124, 58, 237, 0.2); border-color: rgba(219, 39, 119, 0.4); border-top-color: #fff; }
}

/* ==========================================================================
   7. ЗАЛ СЛАВЫ (HALL OF FAME)
   ========================================================================== */

.hof-wrapper {
    margin-bottom: 10px;
    padding: 10px 16px;
    background: rgba(15, 18, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.hof-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.hof-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hof-card:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.hof-rank-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 10px;
    border-bottom-left-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hof-avatar {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    object-fit: cover;
}

.hof-avatar.vip-glow {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(250, 191, 60, 0.3);
}

.hof-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hof-username {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.hof-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .hof-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   8. ЛУТБОКСЫ (ПРИЗЫ) И АКТИВНЫЙ ЧЕЛЛЕНДЖ
   ========================================================================== */

.chal-prizes-container {
    margin-bottom: 10px;
    padding: 10px 0 25px 0;
    background: transparent;
}

.chal-prizes-title {
    margin-bottom: 24px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.chal-prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.chal-prize-item {
    position: relative;
    padding: 24px 15px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chal-prize-item:hover {
    transform: translateY(-5px);
}

.chal-prize-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 60%);
    pointer-events: none;
}

.chal-prize-item.gold { 
    border: 1px solid rgba(250, 204, 21, 0.4); 
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.15);
}

.chal-prize-item.gold::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    z-index: 0;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.1) 0%, transparent 50%);
    pointer-events: none; 
}

.chal-prize-item.silver { 
    border: 1px solid rgba(156, 163, 175, 0.4); 
}

.chal-prize-item.silver::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    z-index: 0;
    background: radial-gradient(circle, rgba(156, 163, 175, 0.08) 0%, transparent 50%);
    pointer-events: none; 
}

.chal-prize-item.bronze { 
    border: 1px solid rgba(180, 83, 9, 0.4); 
}

.chal-prize-item.bronze::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    z-index: 0;
    background: radial-gradient(circle, rgba(180, 83, 9, 0.1) 0%, transparent 50%);
    pointer-events: none; 
}

.prize-place {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prize-desc {
    position: relative;
    z-index: 2;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.8;
}

.prize-text-highlight {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .chal-prizes-grid {
        grid-template-columns: 1fr;
    }
    
    .chal-prize-item {
        padding: 16px;
    }
}

/* ==========================================================================
   9. ПОБЕДИТЕЛИ И ПОСТЫ ЧЕЛЛЕНДЖА
   ========================================================================== */

.chal-winners-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.chal-winner-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 16px;
    text-align: center;
    overflow: hidden;
}

.chal-winner-place {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.chal-winner-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    object-fit: cover;
}

.chal-winner-name {
    margin-bottom: 5px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.chal-winner-votes {
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    color: #f43f5e;
    font-size: 0.8rem;
    font-weight: bold;
}

.challenge-feed-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    align-items: start; 
    gap: 25px !important;
    max-width: 1400px !important; 
    margin: 0 auto !important;
}

@media (max-width: 992px) {
    .challenge-feed-wrapper {
        grid-template-columns: 1fr !important;
        max-width: 650px !important; 
    }
}

.chal-feed-post {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

@media (max-width: 576px) {
    .chal-feed-post {
        padding: 15px;
        border-radius: 16px;
    }
}

.chal-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chal-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.chal-post-userinfo {
    flex-grow: 1;
}

.chal-post-username {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.chal-post-meta {
    color: #94a3b8;
    font-size: 0.75rem;
}

.chal-post-rank {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
}

.chal-post-caption {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid #c084fc;
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chal-post-gallery {
    margin-top: 10px;
    margin-bottom: 5px;
}

.chal-post-img {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s;
}

.chal-post-img:hover {
    filter: brightness(1.1);
}

.chal-post-footer {
    display: flex;
    align-items: center;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-gallery-card .community-card-footer {
    padding: 10px;
}

.hide-scroll-carousel::-webkit-scrollbar {
    display: none;
}

/* Кнопка голосования */
.challenge-vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(244, 63, 94, 0.4);
    border-radius: 20px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.challenge-vote-btn:hover:not(:disabled) {
    background: rgba(244, 63, 94, 0.2);
    border-color: #f43f5e;
    transform: translateY(-2px);
}

.challenge-vote-btn.voted-active {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    border-color: #be123c;
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.challenge-vote-btn:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    cursor: not-allowed;
}

.challenge-vote-btn .vote-icon {
    transition: transform 0.2s;
}

.challenge-vote-btn.voted-active .vote-icon {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   10. АРХИВ ЧЕЛЛЕНДЖЕЙ (ЗАЛ СЛАВЫ)
   ========================================================================== */

.chal-archive-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chal-archive-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    transform: translateY(-5px);
}

.archive-card-bg {
    position: absolute;
    top: 0; 
    left: 0; 
    z-index: 1;
    width: 100%; 
    height: 100%;
    background-position: center;
    background-size: cover;
    transition: transform 0.5s ease;
}

.chal-archive-card:hover .archive-card-bg {
    transform: scale(1.05);
}

.archive-card-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    z-index: 2;
    width: 100%; 
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.95) 80%);
}

.archive-card-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 20px;
}

.archive-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.archive-badge {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.archive-date {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
}

.archive-theme-title {
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.archive-winners-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.archive-winner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.archive-winner-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.archive-winner-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    object-fit: cover;
}

.archive-winner-name {
    max-width: 120px;
    font-size: 0.9rem;
    font-weight: 700;
}

.archive-winner-votes {
    padding: 3px 8px;
    background: rgba(244, 63, 94, 0.1);
    border-radius: 8px;
    color: #f43f5e;
    font-size: 0.8rem;
    font-weight: 800;
}

/* ==========================================================================
   11. ПУЛЬСАЦИЯ КНОПКИ "ЧЕЛЛЕНДЖ"
   ========================================================================== */

@keyframes challengeBreathe {
    0% {
        border-color: rgba(192, 132, 252, 0.3) !important;
        box-shadow: 0 0 5px rgba(192, 132, 252, 0.2);
    }
    50% {
        border-color: rgba(192, 132, 252, 0.8) !important;
        box-shadow: 0 0 15px rgba(192, 132, 252, 0.7), inset 0 0 8px rgba(192, 132, 252, 0.2);
    }
    100% {
        border-color: rgba(192, 132, 252, 0.3) !important;
        box-shadow: 0 0 5px rgba(192, 132, 252, 0.2);
    }
}

button.filter-btn[data-sort="challenge"]:not(.active) {
    animation: challengeBreathe 2s infinite ease-in-out;
}

button.filter-btn[data-sort="challenge"].active {
    background: rgba(192, 132, 252, 0.15) !important;
    border-color: rgba(192, 132, 252, 0.6) !important;
    color: #c084fc !important;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.4) !important;
    animation: none;
}