body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #2d2612;
    background: linear-gradient(135deg, #fff6b8, #ffd84d, #ffb703);
    background-size: 200% 200%;
    animation: bgMove 8s ease infinite;
}

.page {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 48px 0;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: center;
    min-height: 560px;
}

.small-title {
    font-weight: bold;
    letter-spacing: 2px;
    color: #7a5600;
}

h1 {
    margin: 0;
    font-size: 72px;
    line-height: 1;
}

#message {
    font-size: 22px;
    line-height: 1.5;
    word-break: keep-all;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background: #2d2612;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(45, 38, 18, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    box-shadow: none;
}

.skill-button.ready {
    background: linear-gradient(90deg, #2d2612, #00b4d8);
}

.second-button {
    color: #2d2612;
    background: #ffffff;
}

.charge-box {
    max-width: 420px;
    padding: 18px;
    border: 2px solid rgba(45, 38, 18, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
}

.charge-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.charge-line {
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(45, 38, 18, 0.16);
}

#chargeBar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00b4d8, #fff200);
    transition: width 0.35s ease;
}

.pokemon-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 25px 70px rgba(45, 38, 18, 0.2);
}

.pokemon-main {
    width: 330px;
    max-width: 86%;
    animation: floatPokemon 2.6s ease-in-out infinite;
    transition: transform 0.25s ease;
}

.power-shake {
    animation: skillShake 0.16s linear 8;
}

.bolt {
    position: absolute;
    font-size: 54px;
    animation: spark 1.4s ease-in-out infinite;
}

.bolt-one {
    top: 40px;
    left: 42px;
}

.bolt-two {
    right: 42px;
    bottom: 58px;
    animation-delay: 0.4s;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.pokemon-card {
    min-height: 190px;
    padding: 24px;
    text-align: left;
    color: #2d2612;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 14px 35px rgba(45, 38, 18, 0.12);
}

.pokemon-card:hover,
.pokemon-card.active {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(45, 38, 18, 0.18);
}

.pokemon-card.active {
    outline: 3px solid #2d2612;
}

.pokemon-card img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.pokemon-card span {
    display: block;
    margin-top: 14px;
    font-size: 22px;
    font-weight: 800;
}

.pokemon-card small {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #7a5600;
}

.skill-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    place-items: center;
    overflow: hidden;
    color: #2d2612;
    background: rgba(255, 242, 0, 0.78);
    pointer-events: none;
}

.skill-overlay.show {
    display: grid;
    animation: overlayFlash 1.3s ease forwards;
}

.skill-overlay.electric {
    background: rgba(255, 242, 0, 0.78);
}

.skill-overlay.grass {
    background: rgba(96, 210, 98, 0.76);
}

.skill-overlay.fire {
    background: rgba(255, 100, 36, 0.74);
}

.skill-overlay.water {
    background: rgba(76, 184, 255, 0.72);
}

.skill-overlay.normal {
    background: rgba(243, 222, 185, 0.82);
}

.skill-text {
    position: relative;
    z-index: 2;
    font-size: clamp(48px, 10vw, 136px);
    font-weight: 900;
    text-align: center;
    text-shadow: 0 8px 0 rgba(255, 255, 255, 0.45);
    animation: skillText 1.1s ease forwards;
}

.skill-ray {
    position: absolute;
    width: 38px;
    height: 120vh;
    background: #ffffff;
    box-shadow: 0 0 32px #00b4d8;
    transform: rotate(22deg);
    animation: rayStrike 0.34s ease infinite;
}

.ray-one {
    left: 22%;
}

.ray-two {
    left: 50%;
    animation-delay: 0.08s;
}

.ray-three {
    right: 20%;
    animation-delay: 0.16s;
}

.flash {
    animation: flashScreen 0.35s ease;
}

.spark-dot {
    position: fixed;
    z-index: 10;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00b4d8;
    pointer-events: none;
    animation: dotMove 0.7s ease forwards;
}

@keyframes bgMove {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes floatPokemon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

@keyframes spark {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.9) rotate(-8deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.12) rotate(8deg);
    }
}

@keyframes flashScreen {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.25);
    }
}

@keyframes dotMove {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-80px) scale(0);
    }
}

@keyframes skillShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-8px) rotate(-2deg);
    }
    75% {
        transform: translateX(8px) rotate(2deg);
    }
}

@keyframes overlayFlash {
    0% {
        opacity: 0;
    }
    12%, 72% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes skillText {
    0% {
        transform: scale(0.4) rotate(-7deg);
    }
    45% {
        transform: scale(1.08) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes rayStrike {
    0%, 100% {
        opacity: 0.12;
        transform: translateY(-30px) rotate(22deg) scaleY(0.8);
    }
    50% {
        opacity: 0.92;
        transform: translateY(30px) rotate(22deg) scaleY(1.08);
    }
}

@media (max-width: 820px) {
    .hero,
    .pokemon-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 48px;
    }

    #message {
        font-size: 20px;
    }

    .pokemon-stage {
        min-height: 320px;
    }
}
