/* Force update - v2 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom, #000000, #1a237e);
    color: white;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.4;
        transform: scale(0.5);
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background-color: transparent;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--twinkle-duration, 3s) ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    background: transparent;
}

#gameCanvas {
    width: 100%;
    height: 100vh;
    touch-action: none;
    background: transparent;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.score-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 1.2em;
    z-index: 100;
    display: flex;
    gap: 20px;
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-title {
    font-size: 48px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 15px 30px;
    font-size: 18px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
}

.mode-selector {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.mode-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Arial', sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mode-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.mode-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Game controls */
#startButton, #pauseButton {
    position: fixed;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    font-size: 1.2em;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(5px);
}

#startButton {
    top: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
}

#pauseButton {
    top: 20px;
    right: 20px;
}

#startButton:hover, #pauseButton:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, 50%) scale(1.05);
}

#pauseButton:hover {
    transform: scale(1.05);
}

/* Points popup */
.points-popup {
    position: absolute;
    color: white;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .game-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .star {
        width: 3px;
        height: 3px;
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
    }

    .score-container {
        font-size: 1em;
        padding: 8px 16px;
    }

    .mode-selector {
        bottom: 10px;
        gap: 10px;
    }

    .mode-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    #startButton, #pauseButton {
        padding: 12px 24px;
        font-size: 1em;
    }

    #pauseButton {
        top: 15px;
        right: 15px;
    }
}

/* Landscape mode adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .game-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    #startButton, #pauseButton {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .mode-selector {
        bottom: 5px;
    }

    .mode-button {
        padding: 5px 12px;
        font-size: 0.8em;
    }
}

/* Remove old power-ups styles */
.power-ups {
    display: none;
}

.touch-feedback {
    position: fixed;
    width: clamp(30px, 6vw, 40px);
    height: clamp(30px, 6vw, 40px);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: touch-feedback 0.3s ease-out forwards;
    z-index: 1000;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes touch-feedback {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes cooldown-progress {
    0% {
        clip-path: circle(50% at 50% 50%);
    }
    100% {
        clip-path: circle(0% at 50% 50%);
    }
}

/* Ensure consistent animations */
@keyframes pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(0);
    }
}

/* Improve special bubble effects */
.power-up.active {
    animation: pulse 1s infinite;
    background: rgba(255, 255, 255, 0.3);
}

.power-up.active::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    animation: power-up-glow 1s infinite;
    z-index: -1;
}

@keyframes power-up-glow {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Improve mobile responsiveness for special effects */
@media (max-width: 768px) {
    .points-popup {
        font-size: 20px;
    }
    
    .power-up.active::after {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }
}

/* Add visual feedback for special bubbles */
.bubble-star {
    animation: star-twinkle 1s infinite;
}

.bubble-bomb {
    animation: bomb-shake 0.5s infinite;
}

.bubble-rainbow {
    animation: rainbow-shift 2s infinite;
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bomb-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes rainbow-shift {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Improve combo display */
.combo-display {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.combo-display.active {
    opacity: 1;
}

.combo-display .multiplier {
    color: #FFD700;
    font-size: 0.8em;
}

/* Add visual feedback for combo */
@keyframes combo-flash {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.combo-flash {
    animation: combo-flash 0.3s ease-out;
}

/* Improve mobile responsiveness */
@media (max-width: 768px) {
    .combo-display {
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
    
    .mode-button::before {
        border-radius: 50%;
    }
}

/* Add visual feedback for power-up activation */
.power-up.activating {
    animation: power-up-activate 0.5s ease-out;
}

@keyframes power-up-activate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
} 