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

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100vh;
}

#header {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

#header h1 {
    font-size: 2.5em;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    letter-spacing: 3px;
}

#level-display {
    font-size: 1.2em;
    margin-top: 10px;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}

#status-bar {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

#fizz-meter-container {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

#fizz-meter-label {
    color: white;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-align: center;
    font-weight: bold;
}

#fizz-meter-bg {
    height: 30px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

#fizz-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff88, #00ccff, #ff00ff);
    transition: width 0.1s ease-out;
    box-shadow: 0 0 20px rgba(0,255,200,0.8);
}

#fizz-percentage {
    text-align: center;
    color: white;
    font-size: 1.2em;
    margin-top: 8px;
    font-weight: bold;
}

#bottle-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#shake-indicator {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    animation: shake-pulse 1s ease-in-out infinite;
}

@keyframes shake-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.shake-text {
    font-size: 3em;
    font-weight: bold;
    color: white;
    text-shadow: 
        3px 3px 0 #ff3333,
        -3px -3px 0 #ff3333,
        3px -3px 0 #ff3333,
        -3px 3px 0 #ff3333,
        0 0 20px rgba(255, 51, 51, 0.8),
        0 0 40px rgba(255, 51, 51, 0.6);
    letter-spacing: 3px;
    margin: 10px 0;
}

.arrow {
    font-size: 4em;
    font-weight: bold;
    color: white;
    text-shadow: 
        2px 2px 0 #ff3333,
        -2px -2px 0 #ff3333,
        2px -2px 0 #ff3333,
        -2px 2px 0 #ff3333,
        0 0 15px rgba(255, 51, 51, 0.8);
    line-height: 0.7;
}

.arrow-up {
    animation: arrow-bounce-up 0.8s ease-in-out infinite;
}

.arrow-down {
    animation: arrow-bounce-down 0.8s ease-in-out infinite;
}

@keyframes arrow-bounce-up {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-15px);
    }
}

@keyframes arrow-bounce-down {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(15px);
    }
}

#bottle {
    width: 120px;
    height: 350px;
    position: relative;
    animation: idle-float 2s ease-in-out infinite;
}

@keyframes idle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

#bottle.shaking {
    animation: shake 0.1s ease-in-out infinite;
}

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

#bottle-cap {
    width: 40px;
    height: 25px;
    background: linear-gradient(180deg, #ff3333, #cc0000);
    border-radius: 5px 5px 0 0;
    margin: 0 auto;
    border: 2px solid #990000;
    position: relative;
    z-index: 10;
    transition: transform 0.3s;
}

#bottle-cap.blown-off {
    animation: cap-blowoff 1s ease-out forwards;
}

@keyframes cap-blowoff {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-300px) rotate(720deg) translateX(50px);
        opacity: 1;
    }
    100% {
        transform: translateY(-400px) rotate(1080deg) translateX(100px);
        opacity: 0;
    }
}

#bottle-cap::after {
    content: '';
    display: block;
    width: 30px;
    height: 8px;
    background: #ffcccc;
    margin: 3px auto;
    border-radius: 2px;
}

#bottle-neck {
    width: 40px;
    height: 50px;
    background: linear-gradient(180deg, rgba(200,255,200,0.4), rgba(150,255,150,0.6));
    margin: 0 auto;
    border-left: 2px solid rgba(255,255,255,0.5);
    border-right: 2px solid rgba(0,0,0,0.2);
}

#bottle-body {
    width: 120px;
    height: 275px;
    background: linear-gradient(135deg, rgba(200,255,200,0.4), rgba(150,255,150,0.8));
    border-radius: 10px;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 
        inset -10px 0 20px rgba(0,0,0,0.2),
        inset 10px 0 20px rgba(255,255,255,0.3),
        0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

#bottle-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    color: #cc0000;
    border: 2px solid #cc0000;
    z-index: 5;
}

#liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, 
        rgba(139, 69, 19, 0.6) 0%,
        rgba(101, 50, 15, 0.8) 100%
    );
    overflow: visible;
    transition: height 0.3s ease-out;
    transform-origin: bottom center;
}

#liquid.sloshing {
    animation: slosh 0.15s ease-in-out;
}

@keyframes slosh {
    0%, 100% { 
        transform: skewX(0deg); 
    }
    25% { 
        transform: skewX(-3deg) translateX(-2px); 
    }
    75% { 
        transform: skewX(3deg) translateX(2px); 
    }
}

#liquid.overflowing {
    animation: overflow 0.3s ease-in-out infinite;
}

@keyframes overflow {
    0%, 100% { 
        transform: skewX(0deg); 
    }
    25% { 
        transform: skewX(-5deg) translateX(-3px); 
    }
    50% {
        transform: skewX(0deg) translateY(-3px);
    }
    75% { 
        transform: skewX(5deg) translateX(3px); 
    }
}

#liquid::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 10px;
    background: radial-gradient(ellipse at center, 
        rgba(139, 69, 19, 0.8) 0%, 
        rgba(139, 69, 19, 0.4) 100%
    );
    animation: wave 1s ease-in-out infinite;
}

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

#liquid.sloshing::before {
    animation: wave-active 0.2s ease-in-out;
}

@keyframes wave-active {
    0%, 100% { 
        transform: scaleX(1) translateY(0); 
    }
    25% { 
        transform: scaleX(0.95) translateY(-3px) translateX(-5px); 
    }
    75% { 
        transform: scaleX(0.95) translateY(-3px) translateX(5px); 
    }
}

#fizz-particles {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

#fizz-particles.active {
    opacity: 1;
}

.bubble {
    position: absolute;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255,255,255,0.9), 
        rgba(255,255,255,0.3)
    );
    border-radius: 50%;
    animation: rise linear forwards;
    box-shadow: 
        inset -2px -2px 4px rgba(0,0,0,0.2),
        0 0 4px rgba(255,255,255,0.5);
}

@keyframes rise {
    0% {
        bottom: 0;
        opacity: 1;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

#explosion {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
}

#explosion.active {
    animation: explosion-bg 5s ease-out;
}

@keyframes explosion-bg {
    0% { background: rgba(255,255,255,0); }
    10% { background: rgba(255,255,255,0.8); }
    100% { background: rgba(255,255,255,0); }
}

.soda-spray {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(139, 69, 19, 1), rgba(139, 69, 19, 0.5));
    border-radius: 50%;
    animation: spray 5s ease-out forwards;
}

.neck-spray {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.9), rgba(139, 69, 19, 0.4));
    border-radius: 50%;
    animation: neck-spray 5s ease-out forwards;
}

.champagne-spray {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(255, 250, 205, 1), rgba(255, 245, 157, 0.6));
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    animation: spray 5s ease-out forwards;
}

.champagne-neck-spray {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 250, 205, 0.95), rgba(255, 245, 157, 0.5));
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
    animation: neck-spray 5s ease-out forwards;
}

@keyframes neck-spray {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--spray-x), var(--spray-y)) scale(0.3);
        opacity: 0;
    }
}

@keyframes spray {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--spray-x), var(--spray-y)) scale(0.5);
        opacity: 0;
    }
}

#instructions, #victory-screen, #permission-screen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    z-index: 1000;
    max-width: 90%;
}

#instructions p, #permission-screen p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #333;
    font-family: Arial, sans-serif;
    font-weight: normal;
}

#victory-screen h2, #permission-screen h2 {
    font-size: 2.5em;
    color: #ff3333;
    margin-bottom: 20px;
}

#victory-message {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
    font-family: Arial, sans-serif;
    font-weight: normal;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.hidden {
    display: none !important;
}

/* Holiday particles */
.holiday-snowflake {
    position: absolute;
    font-size: 24px;
    color: white;
    text-shadow: 
        0 0 5px rgba(173, 216, 230, 0.8),
        0 0 10px rgba(173, 216, 230, 0.6),
        0 0 15px rgba(173, 216, 230, 0.4);
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
    font-family: serif;
    font-weight: bold;
}

.holiday-snowflake-emoji {
    position: absolute;
    font-size: 48px;
    filter: drop-shadow(0 0 10px rgba(173, 216, 230, 0.9))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 30px rgba(173, 216, 230, 0.6));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-santa {
    position: absolute;
    font-size: 45px;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.9))
            drop-shadow(0 0 20px rgba(255, 215, 0, 0.7));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-present {
    position: absolute;
    font-size: 42px;
    filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.8))
            drop-shadow(0 0 16px rgba(255, 0, 0, 0.6));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-ribbon {
    position: absolute;
    font-size: 38px;
    filter: drop-shadow(0 0 8px rgba(255, 105, 180, 1))
            drop-shadow(0 0 16px rgba(255, 192, 203, 0.8));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-tree {
    position: absolute;
    font-size: 40px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.8))
            drop-shadow(0 0 16px rgba(255, 215, 0, 0.6));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-candy {
    position: absolute;
    font-size: 35px;
    filter: drop-shadow(0 0 8px rgba(255, 0, 127, 0.8))
            drop-shadow(0 0 16px rgba(255, 255, 255, 0.7));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-star {
    position: absolute;
    font-size: 36px;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1))
            drop-shadow(0 0 24px rgba(255, 215, 0, 0.8))
            drop-shadow(0 0 36px rgba(255, 255, 0, 0.6));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-elf {
    position: absolute;
    font-size: 40px;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8))
            drop-shadow(0 0 15px rgba(255, 0, 0, 0.5));
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

.holiday-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 215, 0, 1), rgba(255, 215, 0, 0.3));
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.4);
    animation: holiday-spray 5s ease-out forwards;
    pointer-events: none;
}

@keyframes holiday-spray {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translate(calc(var(--spray-x) * 0.6), calc(var(--spray-y) * 0.6)) rotate(var(--rotation, 180deg)) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(var(--spray-x), var(--spray-y)) rotate(var(--rotation, 360deg)) scale(0.3);
        opacity: 0;
    }
}

/* New Year's Champagne Styling */
.champagne-bottle #bottle-cap {
    background: linear-gradient(180deg, #FFD700, #B8860B);
    border: 2px solid #8B6914;
}

.champagne-bottle #bottle-cap::after {
    background: #FFF8DC;
}

.champagne-bottle #bottle-neck {
    background: linear-gradient(180deg, rgba(220, 255, 220, 0.3), rgba(200, 240, 200, 0.5));
}

.champagne-bottle #bottle-body {
    background: linear-gradient(135deg, 
        rgba(220, 255, 220, 0.3), 
        rgba(180, 230, 180, 0.6),
        rgba(200, 240, 200, 0.5));
    box-shadow: 
        inset -10px 0 20px rgba(100, 120, 100, 0.2),
        inset 10px 0 20px rgba(255, 255, 255, 0.4),
        0 10px 30px rgba(0,0,0,0.3);
}

.champagne-bottle #bottle-label {
    background: rgba(255, 250, 240, 0.95);
    color: #8B6914;
    border: 2px solid #8B6914;
}

.champagne-liquid {
    background: linear-gradient(180deg, 
        rgba(255, 250, 205, 0.7) 0%,
        rgba(255, 245, 157, 0.85) 100%
    ) !important;
}

.champagne-liquid::before {
    background: radial-gradient(ellipse at center, 
        rgba(255, 250, 205, 0.9) 0%, 
        rgba(255, 250, 205, 0.5) 100%
    ) !important;
}

@media (max-height: 700px) {
    #header h1 {
        font-size: 2em;
    }
    #bottle {
        height: 280px;
        width: 100px;
    }
    #bottle-body {
        height: 220px;
        width: 100px;
    }
}
