 .game-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 50;
    background: rgba(0,0,0,0.45);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

    .game-container.show {
        display: block;
        animation: gameAppear 0.4s ease;
    }

@keyframes gameAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.game-container canvas {
    border-radius: 20px;
    display: block;
}

 #memoryGame {
    display: none;
    padding: 25px;
    grid-template-columns: repeat(4, 65px);
    gap: 12px;
}

    #memoryGame.show {
        display: grid;
    }

.memory-card {
    width: 65px;
    height: 65px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

    .memory-card:hover {
        background: rgba(255,255,255,0.12);
        transform: scale(1.08);
    }

    .memory-card.flipped {
        background: rgba(255,212,163,0.25);
        animation: cardFlip 0.3s ease;
    }

@keyframes cardFlip {
    50% {
        transform: rotateY(90deg);
    }
}

.memory-card.matched {
    background: rgba(100,255,150,0.2);
    border-color: rgba(100,255,150,0.4);
    animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
    50% {
        transform: scale(1.15);
    }
}

 #catchGame {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.catcher {
    position: absolute;
    bottom: 60px;
    width: 110px;
    height: 45px;
    background: linear-gradient(90deg, transparent, rgba(255,236,210,0.5), transparent);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(255,236,210,0.4);
    transition: box-shadow 0.2s;
}

    .catcher.catch {
        box-shadow: 0 0 60px rgba(255,236,210,1);
    }

.falling-star {
    position: absolute;
    font-size: 30px;
    animation: fall linear forwards;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

 #drawBoard {
    padding: 20px;
}

    #drawBoard canvas {
        cursor: crosshair;
        background: rgba(0,0,0,0.35);
    }

.draw-tools {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

    .draw-tools button {
        padding: 10px 22px;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 20px;
        color: #ffecd2;
        cursor: pointer;
        transition: all 0.3s;
        font-size: 12px;
    }

        .draw-tools button:hover {
            background: rgba(255,212,163,0.3);
        }

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

    .color-dot:hover {
        transform: scale(1.25);
    }

    .color-dot.active {
        border-color: #fff;
        box-shadow: 0 0 15px rgba(255,255,255,0.6);
        transform: scale(1.1);
    }

.brush-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    outline: none;
}

    .brush-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #ffecd2;
        border-radius: 50%;
        cursor: pointer;
    }

 #connectGame {
    padding: 15px;
}

 #whackGame {
    padding: 25px;
}

.whack-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 15px;
}

.whack-hole {
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.35);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    transition: all 0.2s;
    border: 2px solid rgba(255,255,255,0.1);
}

    .whack-hole:hover {
        background: rgba(255,255,255,0.1);
    }

    .whack-hole.active {
        animation: whackPop 0.3s ease;
        background: rgba(255,212,163,0.2);
    }

@keyframes whackPop {
    50% {
        transform: scale(1.25);
    }
}

 #reactionGame {
    padding: 40px;
    text-align: center;
}

.reaction-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 20px auto;
    background: rgba(255,255,255,0.1);
    border: 3px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #c4b8d9;
    cursor: pointer;
    transition: all 0.3s;
}

    .reaction-circle.waiting {
        background: rgba(255,100,100,0.25);
        border-color: rgba(255,100,100,0.5);
    }

    .reaction-circle.ready {
        background: rgba(100,255,100,0.35);
        border-color: rgba(100,255,100,0.6);
        animation: readyPulse 0.5s ease infinite;
    }

@keyframes readyPulse {
    50% {
        box-shadow: 0 0 30px rgba(100,255,100,0.5);
    }
}

.reaction-result {
    font-size: 26px;
    color: #ffd4a3;
    margin-top: 20px;
}

 #guessGame {
    padding: 30px;
    text-align: center;
    min-width: 280px;
}

.guess-input {
    width: 130px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    color: #ffecd2;
    font-size: 26px;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s;
}

    .guess-input:focus {
        outline: none;
        border-color: #ffd4a3;
        box-shadow: 0 0 20px rgba(255,212,163,0.3);
    }

.guess-btn {
    padding: 12px 35px;
    background: rgba(255,212,163,0.2);
    border: 1px solid rgba(255,212,163,0.3);
    border-radius: 25px;
    color: #ffecd2;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

    .guess-btn:hover {
        background: rgba(255,212,163,0.4);
        transform: scale(1.05);
    }

.guess-hint {
    margin-top: 20px;
    color: #c4b8d9;
    font-size: 18px;
}

 #puzzleGame {
    padding: 20px;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    gap: 6px;
}

.puzzle-tile {
    width: 70px;
    height: 70px;
    background: rgba(255,212,163,0.18);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffecd2;
    transition: all 0.2s;
}

    .puzzle-tile:hover {
        background: rgba(255,212,163,0.3);
        transform: scale(1.05);
    }

    .puzzle-tile.empty {
        background: transparent;
        border: 1px dashed rgba(255,255,255,0.15);
        cursor: default;
    }

    .puzzle-tile.moving {
        animation: tileMove 0.2s ease;
    }

@keyframes tileMove {
    50% {
        transform: scale(0.9);
    }
}

 #bubbleGame {
    padding: 15px;
}

 #snakeGame {
    padding: 20px;
    text-align: center;
}

.snake-hint {
    margin-top: 15px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    letter-spacing: 2px;
}

 #pianoGame {
    padding: 25px;
    text-align: center;
}

.piano-keys {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 15px;
}

.piano-key {
    width: 45px;
    height: 150px;
    background: linear-gradient(180deg, #ffecd2 0%, #e8d4b8 100%);
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

    .piano-key:hover {
        background: linear-gradient(180deg, #fff 0%, #ffecd2 100%);
    }

    .piano-key.active {
        transform: translateY(3px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        background: linear-gradient(180deg, #ffd4a3 0%, #e8c4a8 100%);
    }

    .piano-key.black {
        width: 30px;
        height: 100px;
        background: linear-gradient(180deg, #333 0%, #111 100%);
        margin: 0 -15px;
        z-index: 1;
        position: relative;
    }

        .piano-key.black:hover {
            background: linear-gradient(180deg, #444 0%, #222 100%);
        }

        .piano-key.black.active {
            background: linear-gradient(180deg, #555 0%, #333 100%);
        }

.piano-hint {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    letter-spacing: 2px;
}

 #fortuneGame {
    padding: 40px;
    text-align: center;
    min-width: 300px;
}

.fortune-ball {
    font-size: 100px;
    cursor: pointer;
    transition: all 0.5s;
    animation: fortuneFloat 3s ease-in-out infinite;
}

    .fortune-ball:hover {
        transform: scale(1.1);
    }

    .fortune-ball.shake {
        animation: fortuneShake 0.5s ease;
    }

@keyframes fortuneFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes fortuneShake {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

.fortune-text {
    margin: 30px 0;
    color: #c4b8d9;
    font-size: 16px;
    line-height: 2;
    letter-spacing: 3px;
    min-height: 100px;
}

    .fortune-text.reveal {
        animation: fortuneReveal 1s ease;
    }

@keyframes fortuneReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fortune-btn {
    padding: 12px 30px;
    background: rgba(255,212,163,0.2);
    border: 1px solid rgba(255,212,163,0.3);
    border-radius: 25px;
    color: #ffecd2;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 3px;
    transition: all 0.3s;
    display: none;
}

    .fortune-btn.show {
        display: inline-block;
    }

    .fortune-btn:hover {
        background: rgba(255,212,163,0.4);
    }

 @media (max-width: 600px) {
    #memoryGame {
        grid-template-columns: repeat(4, 55px);
    }

    .memory-card {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .puzzle-grid {
        grid-template-columns: repeat(3, 60px);
    }

    .puzzle-tile {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .whack-grid {
        grid-template-columns: repeat(3, 65px);
        gap: 10px;
    }

    .whack-hole {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }

    .piano-key {
        width: 35px;
        height: 120px;
    }

        .piano-key.black {
            width: 24px;
            height: 80px;
            margin: 0 -12px;
        }
}
