@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #fff;
    background-image:
        radial-gradient(circle, #ff6b6b 1px, transparent 1px),
        radial-gradient(circle, #4ecdc4 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    font-family: 'Bangers', cursive;
    overflow-x: hidden;
}

.container {
    text-align: center;
    padding: 20px;
    position: relative;
    width: 100%;
    max-width: 1200px;
}

.container::before {
    content: "POW!";
    position: absolute;
    top: -30px;
    right: -20px;
    font-size: 36px;
    color: #ff6b6b;
    transform: rotate(15deg);
    text-shadow: 2px 2px 0 #000;
}

.potatoes {
    margin-bottom: 40px;
    position: relative;
    height: 400px;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.potato-img {
    width: 300px;
    height: auto;
    filter: drop-shadow(8px 8px 0 rgba(0,0,0,0.3));
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.potato-img.visible {
    opacity: 1;
    transform: rotate(-5deg) scale(1);
}

#potato-default {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
}

#potato-po.visible {
    opacity: 1;
    transform: translate(calc(-50% - 250px), -50%) rotate(-15deg) scale(1);
}

#potato-ta.visible {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 30px)) rotate(-5deg) scale(1);
}

#potato-to.visible {
    opacity: 1;
    transform: translate(calc(-50% + 250px), -50%) rotate(5deg) scale(1);
}

/* Special potato styling */
#potato-special {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 500px;
    height: auto;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 1000;
    transition: all 0.3s ease-out;
}

#potato-special.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(-5deg) scale(1); }
    25% { transform: translate(-50%, -50%) rotate(5deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
    75% { transform: translate(-50%, -50%) rotate(7deg) scale(1); }
}

.syllables {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
    perspective: 1000px;
}

.syllable {
    font-size: 64px;
    padding: 20px 30px;
    background-color: #fff;
    border: 5px solid #000;
    border-radius: 20px;
    box-shadow: 8px 8px 0px #000;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(.68,-0.55,.265,1.55);
    position: relative;
    letter-spacing: 2px;
    color: #333;
    transform-style: preserve-3d;
}

.syllable::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 20px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    z-index: -1;
}

.syllable:nth-child(1) { background-color: #FFE66D; }
.syllable:nth-child(2) { background-color: #4ECDC4; }
.syllable:nth-child(3) { background-color: #FF6B6B; }

.syllable.active {
    transform: scale(1.3) rotate(5deg);
    opacity: 1;
    box-shadow: 2px 2px 0px #000;
}

.syllable.active::before {
    content: "BANG!";
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #ff6b6b;
    text-shadow: 2px 2px 0 #000;
    animation: pop 0.3s ease-out;
}

@keyframes pop {
    0% { transform: translateX(-50%) scale(0); }
    90% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

.instructions {
    margin-top: 30px;
    font-size: 24px;
    padding: 20px 30px;
    background-color: white;
    border: 4px solid #000;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    transform: rotate(-2deg);
    box-shadow: 5px 5px 0 #000;
    animation: wobble 5s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.instructions::before {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #000;
}
