/**
 * burps.css - Burp Battle game styles
 */

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    touch-action: none;
}

.header {
    padding: 15px 20px;
    z-index: 100;
}

h1 {
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.back-btn {
    padding: 8px 16px;
    border-radius: 20px;
}

.back-btn:hover, .back-btn:active {
    color: #764ba2;
}

.stats {
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.stat-box {
    font-size: 1.1rem;
}

.combo-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transition: transform 0.1s;
}

.combo-box.pulse {
    animation: comboPulse 0.3s ease-out;
}

.combo-box.shake {
    animation: comboShake 0.4s ease-out;
}

@keyframes comboPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes comboShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.lives-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
    min-width: 80px;
}

.level-box {
    background: linear-gradient(135deg, #51cf66 0%, #2f9e44 100%);
}

.lives-box.life-lost {
    animation: lifeLost 0.5s ease-out;
}

@keyframes lifeLost {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); filter: brightness(1.5); }
    40%, 80% { transform: translateX(5px); }
}

.level-box.level-up {
    animation: levelUp 0.5s ease-out;
}

@keyframes levelUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); filter: brightness(1.3); }
    100% { transform: scale(1); }
}

.game-area {
    position: relative;
    width: 100%;
    height: calc(100vh - 130px);
    overflow: hidden;
}

.burp {
    position: absolute;
    cursor: pointer;
    transition: transform 0.1s;
    z-index: 10;
    animation: wobble 0.5s ease-in-out infinite alternate;
}

.burp:active {
    transform: scale(0.9);
}

.burp.small {
    font-size: 2.5rem;
}

.burp.medium {
    font-size: 3.5rem;
}

.burp.large {
    font-size: 5rem;
}

@keyframes wobble {
    from { transform: rotate(-5deg) translateX(-2px); }
    to { transform: rotate(5deg) translateX(2px); }
}

.pop-effect {
    position: absolute;
    pointer-events: none;
    animation: popAnim 0.5s ease-out forwards;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    z-index: 100;
}

@keyframes popAnim {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5) translateY(-30px); opacity: 0; }
}

.burst-particle {
    position: absolute;
    pointer-events: none;
    font-size: 1.5rem;
    animation: burstAnim 0.4s ease-out forwards;
}

@keyframes burstAnim {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    100% { transform: scale(0.5) translate(var(--tx), var(--ty)); opacity: 0; }
}

.start-screen, .game-over-screen {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    color: white;
    text-align: center;
}

.start-screen h2, .game-over-screen h2 {
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.start-screen p, .game-over-screen p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    max-width: 320px;
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 40px;
    font-size: 1.3rem;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    margin-top: 10px;
}

.play-btn:hover, .play-btn:active {
    transform: scale(1.1);
}

.instructions {
    margin-top: 20px;
    font-size: 1rem;
    opacity: 0.8;
}

.high-score-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
}

.final-stats {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px 30px;
    margin: 20px 0;
}

.final-stats p {
    margin: 10px 0;
}

.new-high-score {
    color: #f5576c;
    font-weight: bold;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #f5576c; }
    to { text-shadow: 0 0 20px #f5576c, 0 0 30px #f093fb; }
}

/* Easter Egg: Gas Cloud Room */
.gas-cloud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(76, 175, 80, 0.6) 0%, rgba(56, 142, 60, 0.4) 50%, rgba(27, 94, 32, 0.3) 100%);
    pointer-events: none;
    z-index: 50;
    animation: gasPulse 2s ease-in-out infinite;
}

@keyframes gasPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.gas-wobble {
    animation: gasWobble 0.3s ease-in-out infinite alternate;
}

@keyframes gasWobble {
    0% { transform: rotate(-1deg) scale(1.01); }
    100% { transform: rotate(1deg) scale(0.99); }
}

.gas-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: #4caf50;
    text-shadow: 3px 3px 0 #1b5e20, -1px -1px 0 #1b5e20;
    z-index: 200;
    animation: gasWarnPop 2s ease-out forwards;
    pointer-events: none;
    text-align: center;
}

@keyframes gasWarnPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* Easter Egg: Mega Burp */
.burp.mega {
    font-size: 8rem;
    z-index: 20;
    filter: drop-shadow(0 0 20px gold) drop-shadow(0 0 40px orange);
    animation: megaWobble 0.3s ease-in-out infinite alternate, megaPulse 0.5s ease-in-out infinite;
}

@keyframes megaWobble {
    from { transform: rotate(-8deg) translateX(-5px); }
    to { transform: rotate(8deg) translateX(5px); }
}

@keyframes megaPulse {
    0%, 100% { filter: drop-shadow(0 0 20px gold) drop-shadow(0 0 40px orange); }
    50% { filter: drop-shadow(0 0 30px gold) drop-shadow(0 0 60px red); }
}

.mega-spawn-flash {
    animation: megaFlash 0.5s ease-out;
}

@keyframes megaFlash {
    0% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

.mega-announcement {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: bold;
    color: gold;
    text-shadow: 3px 3px 0 #ff6b00, -2px -2px 0 #ff6b00;
    z-index: 200;
    animation: megaAnnounce 1s ease-out forwards;
    pointer-events: none;
}

@keyframes megaAnnounce {
    0% { transform: translateX(-50%) scale(0) rotate(-10deg); opacity: 0; }
    30% { transform: translateX(-50%) scale(1.5) rotate(5deg); opacity: 1; }
    60% { transform: translateX(-50%) scale(1.2) rotate(-3deg); }
    100% { transform: translateX(-50%) scale(1) translateY(-50px) rotate(0); opacity: 0; }
}

/* Special Burp Types - Stink Bomb (toxic green glow) */
.burp.stink-bomb {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px #00ff00) drop-shadow(0 0 20px #32cd32);
    animation: wobble 0.5s ease-in-out infinite alternate, toxicPulse 0.8s ease-in-out infinite;
}

@keyframes toxicPulse {
    0%, 100% { filter: drop-shadow(0 0 10px #00ff00) hue-rotate(0deg); }
    50% { filter: drop-shadow(0 0 20px #32cd32) hue-rotate(20deg); }
}

/* Golden Burp - sparkly gold */
.burp.golden {
    font-size: 4rem;
    filter: drop-shadow(0 0 15px gold) drop-shadow(0 0 30px orange);
    animation: wobble 0.5s ease-in-out infinite alternate, goldenSparkle 0.5s ease-in-out infinite;
}

@keyframes goldenSparkle {
    0%, 100% { filter: drop-shadow(0 0 15px gold) brightness(1); }
    50% { filter: drop-shadow(0 0 25px yellow) brightness(1.3); }
}

/* Speed Burp - electric yellow, fast wobble */
.burp.speed {
    font-size: 3rem;
    filter: drop-shadow(0 0 8px yellow) drop-shadow(0 0 15px #ffd700);
    animation: speedWobble 0.2s ease-in-out infinite alternate;
}

@keyframes speedWobble {
    from { transform: rotate(-8deg) translateX(-3px); }
    to { transform: rotate(8deg) translateX(3px); }
}

/* Phasing Burp - purple ghostly (opacity controlled in JS) */
.burp.phasing {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px #9370db) drop-shadow(0 0 20px #8a2be2);
    animation: wobble 0.5s ease-in-out infinite alternate;
}

/* Stink bomb hit feedback */
.stink-splash {
    position: absolute;
    font-size: 3rem;
    pointer-events: none;
    animation: stinkSplash 0.6s ease-out forwards;
    z-index: 100;
}

@keyframes stinkSplash {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.stink-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 0, 0.3);
    pointer-events: none;
    z-index: 500;
    animation: stinkFlash 0.3s ease-out forwards;
}

@keyframes stinkFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Easter Egg: The Belcher - Screen shake */
.belcher-shake {
    animation: belcherShake 0.5s ease-in-out;
}

@keyframes belcherShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.belcher-announcement {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    text-align: center;
    z-index: 200;
    animation: belcherPop 2s ease-out forwards;
    pointer-events: none;
}

.belcher-announcement .belcher-text {
    font-size: 2.5rem;
    color: #ff6b6b;
    font-weight: bold;
    text-shadow: 3px 3px 0 #c92a2a;
    display: block;
    margin-top: 10px;
}

@keyframes belcherPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* Easter Egg: Dad's Revenge */
.dads-revenge-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 200;
    animation: dadsRevengePop 2.5s ease-out forwards;
    pointer-events: none;
}

.dads-revenge-popup .dad-emoji {
    font-size: 5rem;
    display: block;
}

.dads-revenge-popup .speech-bubble {
    background: white;
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.dads-revenge-popup .speech-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

@keyframes dadsRevengePop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    85% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* Easter Egg: Perfect Nose */
.perfect-nose-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    z-index: 200;
    animation: sniffAnim 2s ease-out forwards;
    pointer-events: none;
}

.perfect-nose-popup .nose-text {
    font-size: 1.5rem;
    color: #51cf66;
    font-weight: bold;
    text-shadow: 2px 2px 0 #2f9e44;
    display: block;
    margin-top: 10px;
}

@keyframes sniffAnim {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    10% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    20%, 30% { transform: translate(-50%, -48%) scale(1.05); }
    25%, 35% { transform: translate(-50%, -52%) scale(0.95); }
    40%, 50% { transform: translate(-50%, -48%) scale(1.05); }
    45%, 55% { transform: translate(-50%, -52%) scale(0.95); }
    60%, 70% { transform: translate(-50%, -48%) scale(1.05); }
    65%, 75% { transform: translate(-50%, -52%) scale(0.95); }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* Easter Egg: Combo King Crown */
.combo-box {
    position: relative;
}

.combo-crown {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: crownBob 1s ease-in-out infinite;
    z-index: 10;
}

@keyframes crownBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.combo-king-flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 150;
    animation: kingFlash 0.5s ease-out forwards;
}

@keyframes kingFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Level Transition Animation */
.level-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 250;
    animation: levelFlash 1.5s ease-out forwards;
}

@keyframes levelFlash {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

.level-transition-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 3px 3px 0 #b8860b, 6px 6px 10px rgba(0, 0, 0, 0.5);
    z-index: 260;
    animation: levelTextPop 1.5s ease-out forwards;
    pointer-events: none;
    text-align: center;
}

.level-transition-text .level-subtitle {
    display: block;
    font-size: 1.5rem;
    margin-top: 10px;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

@keyframes levelTextPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1); }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.2rem;
    }
    .stat-box {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .burp.small {
        font-size: 2.75rem; /* Increased for better touch targets (44px+) */
    }
    .burp.medium {
        font-size: 3rem;
    }
    .burp.large {
        font-size: 4rem;
    }
    .burp.mega {
        font-size: 6rem;
    }
    .burp.stink-bomb {
        font-size: 3rem;
    }
    .burp.golden {
        font-size: 3.5rem;
    }
    .burp.speed {
        font-size: 2.5rem;
    }
    .burp.phasing {
        font-size: 3rem;
    }
}
