/* ============================================
   CYBER BADGES - Animated Badge System
   ============================================ */

/* Базовый стиль для всех бейджей */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.3rem 0.6rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ============================================
   BADGE "НОВОЕ" (NEW) - Оранжевое свечение
   ============================================ */
.badge.new {
    background: linear-gradient(135deg, #FF6D00, #FF8F00);
    color: white;
    box-shadow: 0 0 10px rgba(255, 109, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: newBadgePulse 2s infinite ease-in-out;
}

/* Эффект блеска */
.badge.new::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 60%
    );
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

/* Мерцание границы */
.badge.new::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: borderPulse 1.5s infinite ease-in-out;
}

@keyframes newBadgePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 109, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 109, 0, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

/* ============================================
   BADGE "СКОРО" (SOON) - Розовое мигание
   ============================================ */
.badge.soon {
    background: linear-gradient(135deg, #ff0055, #ff4081);
    color: white;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: soonBadgeBlink 1.5s infinite;
}

/* Частицы вокруг бейджа */
.badge.soon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle,
        rgba(255, 0, 85, 0.3) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    animation: soonParticles 2s infinite;
}

@keyframes soonBadgeBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 12px rgba(255, 0, 85, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 25px rgba(255, 0, 85, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

@keyframes soonParticles {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   BADGE "ОБНОВЛЕНО" (UPDATED) - Синее скольжение
   ============================================ */
.badge.updated {
    background: linear-gradient(135deg, #2962ff, #448aff);
    color: white;
    box-shadow: 0 0 10px rgba(41, 98, 255, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: updatedBadgeSlide 2.5s infinite ease-in-out;
}

/* Волна света */
.badge.updated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: waveSlide 2s infinite;
}

@keyframes updatedBadgeSlide {
    0%, 100% {
        transform: translateX(0);
        box-shadow: 0 0 10px rgba(41, 98, 255, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: translateX(2px);
        box-shadow: 0 0 18px rgba(41, 98, 255, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

@keyframes waveSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================================
   BADGE "ТОП" (HOT) - Красный огонь
   ============================================ */
.badge.hot {
    background: linear-gradient(135deg, #ff3d00, #ff6f00);
    color: white;
    box-shadow: 0 0 15px rgba(255, 61, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: hotBadgeFlame 1.2s infinite ease-in-out;
}

/* Эффект пламени */
.badge.hot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    right: 0;
    bottom: -50%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 100, 0, 0.5) 0%,
        transparent 70%
    );
    animation: flameFlicker 0.8s infinite alternate;
}

@keyframes hotBadgeFlame {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 61, 0, 0.8), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 100, 0, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

@keyframes flameFlicker {
    0% {
        transform: scaleY(1);
        opacity: 0.6;
    }
    100% {
        transform: scaleY(1.2);
        opacity: 0.3;
    }
}

/* ============================================
   BADGE "ПЛАТНО" (PAID) - Золотой блеск
   ============================================ */
.badge.paid {
    background: linear-gradient(135deg, #ffd700, #ffa000);
    color: #1a1a1a;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: goldBadgePulse 1.8s infinite ease-in-out;
}

/* Золотые звёзды */
.badge.paid::before {
    content: '?';
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    animation: starTwinkle 1.5s infinite;
}

.badge.paid::after {
    content: '?';
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    animation: starTwinkle 1.5s infinite 0.5s;
}

@keyframes goldBadgePulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 22px rgba(255, 215, 0, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* ============================================
   BADGE "БЕСПЛАТНО" (FREE) - Зелёное сияние
   ============================================ */
.badge.free {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: white;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: freeBadgeGlow 2.2s infinite alternate;
}

/* Круги расходящиеся */
.badge.free::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 230, 118, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 2s infinite;
}

@keyframes freeBadgeGlow {
    0% {
        box-shadow: 0 0 12px rgba(0, 230, 118, 0.7), 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 22px rgba(0, 230, 118, 1), 0 6px 12px rgba(0, 0, 0, 0.4);
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   ОБЩИЕ АНИМАЦИИ
   ============================================ */

/* Блеск */
@keyframes shine {
    0% {
        transform: rotate(30deg) translate(-150%, -150%);
    }
    100% {
        transform: rotate(30deg) translate(150%, 150%);
    }
}

/* Пульсация границы */
@keyframes borderPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   HOVER ЭФФЕКТЫ
   ============================================ */

.badge:hover {
    transform: scale(1.1);
    cursor: default;
}

.badge.new:hover {
    box-shadow: 0 0 25px rgba(255, 109, 0, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.badge.soon:hover {
    box-shadow: 0 0 30px rgba(255, 0, 85, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.badge.updated:hover {
    box-shadow: 0 0 25px rgba(41, 98, 255, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.badge.hot:hover {
    box-shadow: 0 0 30px rgba(255, 61, 0, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.badge.paid:hover {
    box-shadow: 0 0 28px rgba(255, 215, 0, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.badge.free:hover {
    box-shadow: 0 0 28px rgba(0, 230, 118, 1), 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}
