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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #d800b4 0%, #3e30ff 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
}

.game-container {
    width: min(800px, 100vw - 20px);
    height: min(600px, 100vh - 20px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

.score-info {
    display: flex;
    gap: 30px;
    font-size: 18px;
    font-weight: bold;
}

.level-info {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

@media (max-width: 768px) {
    .game-header {
        padding: 10px;
    }
    
    .score-info {
        gap: 15px;
        font-size: 14px;
    }
    
    .level-info {
        font-size: 18px;
    }
}

.game-area {
    width: 100%;
    height: calc(100% - 100px);
    position: relative;
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
}

@media (max-width: 768px) {
    .game-area {
        height: calc(100% - 80px);
    }
}

.bubble {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.1s;
}

.bubble:hover {
    transform: scale(1.1);
}

.bubble.red { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.bubble.blue { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.bubble.green { background: linear-gradient(135deg, #95e1d3, #fce38a); }
.bubble.yellow { background: linear-gradient(135deg, #ffeaa7, #fab1a0); }
.bubble.purple { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.bubble.orange { background: linear-gradient(135deg, #fd79a8, #fdcb6e); }

.shooter-area {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.shooter {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7675, #d63031);
    border: 4px solid white;
    cursor: pointer;
    transition: transform 0.1s;
}

.shooter:hover {
    transform: scale(1.1);
}

.next-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.1s;
    position: relative;
    pointer-events: none;
}

.next-bubble::before {
    content: 'Next';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.swap-button {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
    margin-left: 150px;
}

.swap-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.swap-button:active {
    transform: translateY(0);
}

.swap-indicator {
    color: white;
    font-size: 12px;
    text-align: center;
    margin-top: 5px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .shooter-area {
        bottom: 10px;
        gap: 15px;
    }
    
    .shooter {
        width: 50px;
        height: 50px;
    }
    
    .next-bubble {
        width: 35px;
        height: 35px;
    }

    .swap-button {
        padding: 10px 16px;
        font-size: 12px;
    }
}

.trajectory {
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.6);
    transform-origin: bottom;
    pointer-events: none;
}

.game-over, .level-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: none;
}

.game-over h2, .level-complete h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.level-complete h2 {
    color: #00b894;
}

.restart-btn, .next-level-btn {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}

.restart-btn:hover, .next-level-btn:hover {
    transform: scale(1.05);
}

.controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .controls {
        bottom: 80px;
        font-size: 12px;
        padding: 0 10px;
    }
}

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

.bubble.popping {
    animation: bubble-pop 0.3s ease-out forwards;
}

@keyframes bubble-fall {
    to { transform: translateY(600px); opacity: 0; }
}

.bubble.falling {
    animation: bubble-fall 1s ease-in forwards;
}