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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin: 20px 0;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #4ecdc4;
}

.ghost {
    width: 100px;
    height: 120px;
    margin: 20px auto;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.ghost-body {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50% 50% 0 0;
    position: relative;
}

.eyes {
    position: absolute;
    top: 40%;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.eyes::before, .eyes::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    display: block;
}

.mouth {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #333;
    border-radius: 0 0 10px 10px;
}

.ghost-tail {
    height: 20px;
    background: white;
    position: relative;
}

.ghost-tail::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: white;
    border-radius: 0 0 20px 20px;
}

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

.birthday-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    backdrop-filter: blur(5px);
}

.cake {
    width: 100px;
    height: 80px;
    background: #ff9a9e;
    margin: 20px auto;
    border-radius: 10px;
    position: relative;
}

.candle {
    width: 10px;
    height: 30px;
    background: white;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    width: 15px;
    height: 30px;
    background: #ffd700;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 20% 20%;
    animation: flicker 1s infinite;
}

@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(0.9); }
}

button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s;
}

button:hover {
    transform: scale(1.1);
}

.game-section {
    margin: 30px 0;
}

#balloons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.balloon {
    width: 60px;
    height: 80px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
    animation: floatBalloon 3s ease-in-out infinite;
}

@keyframes floatBalloon {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-10px) rotate(-3deg); }
}

#score {
    font-size: 1.5em;
    color: #4ecdc4;
}

.wishes {
    font-size: 1.2em;
    margin: 20px 0;
    min-height: 50px;
}

.level-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

#progressFill {
    width: 0%;
    height: 100%;
    background: #4ecdc4;
    transition: width 0.5s ease;
}

.game-level {
    display: none;
    margin: 20px 0;
}

.game-level.active {
    display: block;
}

#ghostCatcher {
    height: 300px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.flying-ghost {
    position: absolute;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s;
}

.flying-ghost img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hidden {
    display: none;
}

.special-message {
    margin-top: 30px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px #4ecdc4;
    }
    to {
        box-shadow: 0 0 20px #4ecdc4, 0 0 30px #4ecdc4;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.5em; }
    .container { padding: 10px; }
    .balloon { width: 50px; height: 70px; }
}

.timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 25px;
    margin: 10px auto;
    width: fit-content;
    font-size: 1.2em;
    color: #4ecdc4;
}

.power-up {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    animation: bounce 1s infinite;
    z-index: 10;
}

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

.special-balloon {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: particle 0.8s ease-out forwards;
}

@keyframes particle {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.typing-effect {
    border-right: 3px solid #4ecdc4;
    animation: typing 1s steps(40) infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes typing {
    0%, 100% { border-color: transparent; }
    50% { border-color: #4ecdc4; }
}

.ghost-trail {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: fade-out 0.5s forwards;
}

@keyframes fade-out {
    to { transform: scale(0.5); opacity: 0; }
}

.level-transition {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.power-up-text {
    position: absolute;
    color: #ffd93d;
    font-weight: bold;
    animation: float-up 1s forwards;
    pointer-events: none;
}

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

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.birthday-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
    z-index: 1001;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.birthday-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.birthday-popup h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.birthday-popup img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 20px 0;
    border: 5px solid white;
    animation: rotate 20s linear infinite;
}

@keyframes popIn {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 30px;
    background: #ffd700;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.sparkle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle linear forwards;
}

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

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.gift-button {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 10px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.gift-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}
