:root {
    --cycle: 15s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
}

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -10;
    background: linear-gradient(
            to bottom,
            #0aaaec 0%,
            #8fd0ff 45%,
            #65d626 45%,
            #287c06 100%
    );
}

.cloud {
    position: absolute;
    width: 120px;
    height: 35px;
    background: #ffffff;
    border-radius: 20px;
    opacity: 0.85;
    top: 10%;
    animation: move-cloud 15s linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

.cloud::before {
    width: 45px;
    height: 45px;
    top: -20px;
    left: 15px;
}

.cloud::after {
    width: 65px;
    height: 65px;
    top: -30px;
    right: 10px;
}

.cloud-1 {
    top: 12%;
    transform: scale(0.8);
    animation-delay: -3s;
}

.cloud-2 {
    top: 5%;
    transform: scale(1.1);
    animation-duration: 20s;
    animation-delay: -10s;
}

.cloud-3 {
    top: 20%;
    transform: scale(0.6);
    animation-duration: 12s;
}

@keyframes move-cloud {
    0% { left: -160px; }
    100% { left: 100%; }
}

.stage {
    height: 80vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pokemon {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.flash {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 140px;
    height: 140px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 1), rgba(255, 200, 0, 0.7) 40%, rgba(255, 100, 0, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.flash1 {
    animation: flashAnim var(--cycle) linear infinite;
    animation-delay: 0s;
}

.flash2 {
    animation: flashAnim var(--cycle) linear infinite;
    animation-delay: calc(var(--cycle)*0.33);
}

.flash3 {
    animation: flashAnim var(--cycle) linear infinite;
    animation-delay: calc(var(--cycle)*0.66);
}

.pokemon img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    image-rendering: pixelated;
}

#charmander {
    animation: evoCharmander var(--cycle) linear infinite;
    width: 120px;
}

#charmeleon {
    animation: evoCharmeleon var(--cycle) linear infinite;
    animation-delay: calc(var(--cycle)*0.33);
    width: 170px;
}

#charizard {
    animation: evoCharizard var(--cycle) linear infinite;
    animation-delay: calc(var(--cycle)*0.66);
    width: 260px;
}

@keyframes evoCharmander {
    0% { opacity: 0; transform: translateX(-50%) scale(0.7); }
    7% { opacity: 1; transform: translateX(-50%) scale(0.85); }
    30% { opacity: 1; transform: translateX(-50%) scale(0.9); }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes evoCharmeleon {
    0% { opacity: 0; transform: translateX(-50%) scale(0.8); }
    7% { opacity: 1; transform: translateX(-50%) scale(1.1); }
    30% { opacity: 1; transform: translateX(-50%) scale(1.2); }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes evoCharizard {
    0% { opacity: 0; transform: translateX(-50%) scale(1.1); }
    7% { opacity: 1; transform: translateX(-50%) scale(1.4); }
    30% { opacity: 1; transform: translateX(-50%) scale(1.55); }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes flashAnim {
    0% { opacity: 0; transform: translateX(-50%) scale(0.3); }
    3% { opacity: 1; transform: translateX(-50%) scale(1.4); }
    6% { opacity: 0; transform: translateX(-50%) scale(1.8); }
    100% { opacity: 0; }
}

.caption {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: black;
    background: rgba(255, 255, 255, 0.6);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 14px;
}