* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: sans-serif;
}

#game {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F7FA 100%);
    position: relative;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 
        inset -10px -10px 20px rgba(0,0,0,0.1),
        inset 10px 10px 20px rgba(255,255,255,0.5),
        0 4px 8px rgba(0,0,0,0.15);
}

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

.bubble.popped {
    animation: pop 0.2s ease-out forwards;
}

@keyframes pop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

#title-bar {
    position: absolute;
    top: 15px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.title-text {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.fullscreen-btn {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}
.fullscreen-btn:active {
    transform: scale(0.9);
}

.sparkle-star {
    position: absolute;
    pointer-events: none;
    animation: sparkleFade 0.8s ease-out forwards;
    z-index: 5;
}

@keyframes sparkleFade {
    0% { transform: scale(0.5) translateY(0); opacity: 1; }
    50% { transform: scale(1.2) translateY(-20px); opacity: 0.8; }
    100% { transform: scale(0.3) translateY(-40px); opacity: 0; }
}

#score {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 48px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

#back {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 24px;
    color: white;
    text-decoration: none;
    background: rgba(0,0,0,0.3);
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

#back:active {
    background: rgba(0,0,0,0.5);
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: fall 1s ease-in forwards;
}

@keyframes fall {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(100px) scale(0); opacity: 0; }
}
