/**
 * 🔥 ADDICTIVE VISUAL DESIGN - JULES 2025
 * Design baseado em psicologia de dopamina e engajamento
 * Pesquisa: 90% dos julgamentos são baseados em cor
 * Decisões em 50 milissegundos
 */

/* ==========================================
   🎨 CORES DOPAMINÉRGICAS
   ========================================== */
:root {
    /* Cores de Alta Dopamina */
    --fire-red: #ff3366;
    --electric-blue: #00d4ff;
    --neon-green: #00ff88;
    --gold-shine: #ffd700;
    --purple-pulse: #a855f7;
    --orange-energy: #ff6b35;

    /* Gradientes Viciantes */
    --gradient-fire: linear-gradient(135deg, #ff3366 0%, #ff6b35 50%, #ffd700 100%);
    --gradient-neon: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    --gradient-success: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    --gradient-exclusive: linear-gradient(135deg, #ffd700 0%, #ff3366 100%);
    --gradient-energy: linear-gradient(135deg, #ff6b35 0%, #ff3366 100%);

    /* Sombras Dopaminérgicas */
    --shadow-glow-red: 0 0 20px rgba(255, 51, 102, 0.6);
    --shadow-glow-blue: 0 0 20px rgba(0, 212, 255, 0.6);
    --shadow-glow-gold: 0 0 30px rgba(255, 215, 0, 0.8);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   🎭 BACKGROUND ANIMADO VIVO
   ========================================== */
body {
    background: linear-gradient(
        -45deg,
        #11111b,
        #1e1e2e,
        #2d2d3d,
        #1a1a2e
    );
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

html[data-theme="light"] body {
    background: linear-gradient(
        -45deg,
        #f8fafc,
        #ffffff,
        #f1f5f9,
        #e2e8f0
    );
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* ==========================================
   🃏 CARDS COM EFEITO 3D E GLASS MORPHISM
   ========================================== */
.promo-card {
    /* Glass Morphism */
    background: rgba(30, 30, 46, 0.7);
    backdrop-filter: blur(10px);

    /* Sombra 3D Suave */
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

html[data-theme="light"] .promo-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* Efeito de Brilho ao Hover */
.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

.promo-card:hover::before {
    left: 100%;
}

/* Hover com Sombra 3D Dramática */
.promo-card:hover {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 15px 25px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-12px) scale(1.03);
}

/* Borda Brilhante Neon ao Hover */
.promo-card:hover {
    border: 2px solid transparent;
    background-image:
        linear-gradient(rgba(30, 30, 46, 0.7), rgba(30, 30, 46, 0.7)),
        var(--gradient-neon);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

html[data-theme="light"] .promo-card:hover {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
        var(--gradient-neon);
}

/* ==========================================
   🏷️ BADGES ANIMADOS E PULSANTES
   ========================================== */

/* Badge NOVO - Pulsa com brilho */
.badge-new {
    background: var(--gradient-fire) !important;
    animation: pulse-glow 2s infinite;
    box-shadow: var(--shadow-glow-red);
    font-weight: 800;
    letter-spacing: 1px;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 35px rgba(255, 51, 102, 1);
    }
}

/* Badge de Oferta - Shake para chamar atenção */
.promo-badge {
    animation: shake-badge 4s infinite;
}

@keyframes shake-badge {
    0%, 90%, 100% { transform: rotate(0deg); }
    91% { transform: rotate(-8deg); }
    93% { transform: rotate(8deg); }
    95% { transform: rotate(-8deg); }
    97% { transform: rotate(8deg); }
    99% { transform: rotate(-4deg); }
}

/* Badge Urgente - Pisca rapidamente */
.badge-urgent {
    background: var(--fire-red) !important;
    animation: blink-urgent 1.5s infinite;
    box-shadow: var(--shadow-glow-red);
}

@keyframes blink-urgent {
    0%, 100% {
        opacity: 1;
        background: var(--fire-red);
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        background: var(--orange-energy);
        transform: scale(1.05);
    }
}

/* Badge Exclusivo - Dourado brilhante */
.badge-exclusive {
    background: var(--gradient-exclusive) !important;
    animation: golden-shine 3s infinite;
    box-shadow: var(--shadow-glow-gold);
}

@keyframes golden-shine {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    50% {
        filter: brightness(1.3);
        box-shadow: 0 0 50px rgba(255, 215, 0, 1);
    }
}

/* ==========================================
   🎯 MICRO-INTERAÇÕES - BOTÕES
   ========================================== */

/* Botão Ver Oferta - Celebração ao clicar */
.promo-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.promo-btn:active::before {
    width: 300px;
    height: 300px;
}

.promo-btn:active {
    transform: scale(0.95);
    animation: celebrate-click 0.6s ease;
}

@keyframes celebrate-click {
    0%, 100% { transform: scale(0.95); }
    25% { transform: scale(1.05) rotate(-3deg); }
    50% { transform: scale(1.1) rotate(3deg); }
    75% { transform: scale(1.05) rotate(-2deg); }
}

/* Botão Copiar Cupom - Sucesso visual */
.copy-btn {
    position: relative;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: var(--gradient-success) !important;
    animation: success-pulse 0.6s ease;
}

@keyframes success-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ==========================================
   ✨ PARTÍCULAS E CONFETE
   ========================================== */
.confetti-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    animation: confetti-fall 1.2s ease-out forwards;
    z-index: 9999;
}

@keyframes confetti-fall {
    to {
        transform: translate(var(--x), var(--y)) rotate(720deg);
        opacity: 0;
    }
}

/* Estrelas de celebração */
.star-particle {
    position: fixed;
    font-size: 20px;
    pointer-events: none;
    animation: star-burst 1s ease-out forwards;
    z-index: 9999;
}

@keyframes star-burst {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* ==========================================
   ⏰ INDICADORES DE URGÊNCIA VISUAL
   ========================================== */

/* Contador de Pessoas Online */
.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--electric-blue);
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    }
}

/* Ponto Pulsante */
.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--fire-red);
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 10px rgba(255, 51, 102, 0);
    }
}

/* Timer de Urgência */
.urgent-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-fire);
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    animation: timer-pulse 1s infinite;
    box-shadow: var(--shadow-glow-red);
}

@keyframes timer-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.countdown {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    font-size: 1rem;
}

/* Barra de Estoque */
.stock-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
}

.stock-fill {
    height: 100%;
    background: var(--gradient-fire);
    border-radius: 12px;
    transition: width 0.6s ease;
    animation: fill-pulse 2s infinite;
    position: relative;
}

@keyframes fill-pulse {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.85;
        filter: brightness(1.2);
    }
}

.stock-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: stock-shimmer 2s infinite;
}

@keyframes stock-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stock-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* ==========================================
   🎪 SKELETON LOADING PREMIUM
   ========================================== */
.skeleton-card {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 400% 100%;
    animation: shimmer-premium 2s ease-in-out infinite;
}

@keyframes shimmer-premium {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.skeleton-line {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer-premium 1.5s ease-in-out infinite;
}

/* ==========================================
   🔢 NÚMEROS ANIMADOS
   ========================================== */
.stat-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.stat-number.counting {
    color: var(--electric-blue);
    animation: number-pop 0.5s ease;
}

@keyframes number-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ==========================================
   🎨 EFEITOS ESPECIAIS
   ========================================== */

/* Efeito de brilho em cupons */
.promo-coupon {
    position: relative;
    overflow: hidden;
}

.promo-coupon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: coupon-shine 3s infinite;
}

@keyframes coupon-shine {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(360deg) translateY(-10px); }
}

/* Efeito de profundidade em imagens */
.promo-card-image {
    position: relative;
}

.promo-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.promo-card:hover .promo-card-image::after {
    opacity: 1;
}

/* Efeito de flutuação */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   🌟 SISTEMA DE REAÇÕES RÁPIDAS
   ========================================== */

/* Container de Reações */
.reactions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Botão Individual de Reação */
.reaction-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.reaction-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--electric-blue);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.reaction-btn:active {
    transform: scale(0.95);
}

/* Emoji da Reação */
.reaction-emoji {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    filter: grayscale(0.3);
}

.reaction-btn:hover .reaction-emoji {
    transform: scale(1.2) rotate(-5deg);
    filter: grayscale(0);
}

/* Contador de Reações */
.reaction-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Estado Ativo (Usuário reagiu) */
.reaction-btn.active {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), inset 0 0 10px rgba(0, 212, 255, 0.2);
}

.reaction-btn.active .reaction-emoji {
    filter: grayscale(0);
    transform: scale(1.1);
    animation: reaction-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.reaction-btn.active .reaction-count {
    color: var(--electric-blue);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* Animação ao Reagir */
@keyframes reaction-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4) rotate(15deg); }
    100% { transform: scale(1.1); }
}

/* Animação de Burst ao Clicar */
.reaction-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.6s ease;
}

.reaction-btn:active::before {
    width: 100px;
    height: 100px;
    opacity: 1;
    transition: all 0s;
}

/* Pulso Contínuo em Reações Populares */
.reaction-btn.popular {
    animation: popular-pulse 2s ease-in-out infinite;
}

@keyframes popular-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.2);
    }
}

/* Efeito de Partículas ao Reagir */
.reaction-particle {
    position: fixed;
    pointer-events: none;
    font-size: 1.5rem;
    animation: particle-rise 1.2s ease-out forwards;
    z-index: 9999;
}

@keyframes particle-rise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5) rotate(360deg);
    }
}

/* ==========================================
   📱 RESPONSIVIDADE DOS EFEITOS
   ========================================== */
@media (max-width: 768px) {
    /* Reduzir intensidade de animações em mobile */
    .promo-card:hover {
        transform: translateY(-6px) scale(1.01);
    }

    .badge-new,
    .badge-urgent {
        animation-duration: 3s;
    }

    body {
        animation-duration: 20s;
    }
}

/* ==========================================
   ♿ ACCESSIBILITY - Respeitar preferências
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .promo-card:hover {
        transform: none;
    }
}

/* ==========================================
   🎭 TEMA CLARO - Ajustes de cores
   ========================================== */
html[data-theme="light"] .online-indicator {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--electric-blue);
}

html[data-theme="light"] .stock-bar {
    background: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .reaction-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .reaction-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}
