/* Keyword Balloons Game CSS */

.keyword-balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(42, 92, 130, 0.95) 0%, rgba(97, 176, 176, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 10002;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.keyword-balloon-header {
    position: absolute;
    top: 80px;
    text-align: center;
    color: white;
    z-index: 10001;
}

.keyword-balloon-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFD166 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.keyword-balloon-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.keyword-balloon-game-area {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.keyword-balloon {
    position: absolute;
    width: 120px;
    height: 140px;
    cursor: pointer;
    user-select: none;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.keyword-balloon:hover {
    transform: scale(1.1);
}

.balloon-shape {
    width: 100%;
    height: 100px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    animation: balloonFloat 3s ease-in-out infinite;
}

.balloon-text {
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    padding: 8px;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    max-width: 80px;
    word-wrap: break-word;
}

.balloon-string {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: rgba(255,255,255,0.6);
    border-radius: 1px;
}

/* Balloon Colors */
.balloon-color-1 { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); }
.balloon-color-2 { background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%); }
.balloon-color-3 { background: linear-gradient(135deg, #FFD166 0%, #F7931E 100%); }
.balloon-color-4 { background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%); }
.balloon-color-5 { background: linear-gradient(135deg, #3498DB 0%, #2980B9 100%); }
.balloon-color-6 { background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%); }

/* Balloon Animations */
@keyframes balloonFloat {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes balloonFall {
    0% { 
        transform: translateY(-50px) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh) scale(0.8) rotate(15deg);
        opacity: 0.8;
    }
}

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

.balloon-falling {
    animation: balloonFall linear;
}

.balloon-popping {
    animation: balloonPop 0.3s ease-out forwards;
    pointer-events: none;
}

/* Pop Effect */
.balloon-pop-effect {
    position: absolute;
    pointer-events: none;
    z-index: 1001;
}

.pop-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #FFD166;
    border-radius: 50%;
    animation: popParticle 0.6s ease-out forwards;
}

@keyframes popParticle {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0) translate(var(--dx), var(--dy));
        opacity: 0;
    }
}

/* Selected Keywords Display */
.selected-keywords {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    max-width: 80%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 10001;
}

.selected-keywords h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

.selected-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.selected-keyword-tag {
    background: linear-gradient(135deg, #FFD166 0%, #FF6B6B 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    animation: keywordAppear 0.3s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .keyword-balloon-header h2 {
        font-size: 2rem;
    }
    
    .keyword-balloon-header p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .keyword-balloon {
        width: 100px;
        height: 120px;
    }
    
    .balloon-text {
        font-size: 0.8rem;
        max-width: 70px;
    }
    
    .selected-keywords {
        bottom: 80px;
        padding: 15px 20px;
    }
}

/* No balloons left message */
.no-balloons-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 1.2rem;
    opacity: 0.8;
    z-index: 10001;
}