# ASCII fire animation — press Ctrl+C to stop
import random
import time

FIRE_CHARS = " .^*`~:;+=xX#&"
WIDTH = 40
HEIGHT = 12

def flame_line():
    return "".join(random.choice(FIRE_CHARS) for _ in range(WIDTH))

try:
    while True:
        print("\033[2J\033[H", end="")  # clear terminal
        print("=== ASCII Fire ===\n")
        for _ in range(HEIGHT):
            # brighter toward bottom
            print(flame_line())
        time.sleep(0.12)
except KeyboardInterrupt:
    print("\nFire extinguished.")
