/* Animated "🔥 Hot #N" badge for the top-performing strategy templates.
   Used by index.html and templates.html via assets/js/hot-templates.js.
   A dark ember background keeps the flame and the fiery text readable;
   an orange/yellow badge made the 🔥 emoji blend into it. */
.hot-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #2a0700 0%, #4a0f00 55%, #1c0400 100%);
    border: 1px solid rgba(255, 140, 0, 0.85);
    padding: 3px 11px 3px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    animation: hot-badge-glow 1.4s ease-in-out infinite;
}

.hot-badge .hot-label {
    background: linear-gradient(180deg, #fff3b0 0%, #ffc93c 45%, #ff7b00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hot-badge .hot-flame {
    position: relative;
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transform-origin: 50% 100%;
    animation: hot-flame-flicker 0.6s ease-in-out infinite alternate;
}

/* Heat glow behind the flame */
.hot-badge .hot-flame::before {
    content: '';
    position: absolute;
    inset: -4px -3px -1px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 70%, rgba(255, 214, 0, 0.75), rgba(255, 94, 0, 0.35) 45%, transparent 70%);
    z-index: -1;
    animation: hot-flame-heat 0.9s ease-in-out infinite alternate;
}

/* Pinned to the card's top-left corner (templates.html cards). */
.hot-badge.hot-badge-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    font-size: 0.8rem;
}

@keyframes hot-flame-flicker {
    0%   { transform: scale(1, 1) rotate(-5deg) translateY(0); filter: drop-shadow(0 0 2px #ffd000) brightness(1.05); }
    35%  { transform: scale(1.08, 1.22) rotate(4deg) translateY(-1px); filter: drop-shadow(0 0 5px #ff8a00) brightness(1.25); }
    70%  { transform: scale(0.96, 1.1) rotate(-2deg) translateY(0); filter: drop-shadow(0 0 3px #ff4d00) brightness(1.1); }
    100% { transform: scale(1.05, 1.28) rotate(3deg) translateY(-2px); filter: drop-shadow(0 0 7px #ffb300) brightness(1.3); }
}

@keyframes hot-flame-heat {
    0%   { opacity: 0.55; transform: scale(0.9); }
    100% { opacity: 1;    transform: scale(1.2); }
}

@keyframes hot-badge-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 94, 0, 0.55), 0 0 10px rgba(255, 60, 0, 0.25); }
    50%      { box-shadow: 0 0 9px rgba(255, 150, 0, 0.95), 0 0 20px rgba(255, 60, 0, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .hot-badge, .hot-badge .hot-flame, .hot-badge .hot-flame::before { animation: none; }
}
