.tap-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
}
#gameContainer {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.tapcoins-popup, .flappybird-popup, .cardflip-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tapcoins-popup-congratulation, .flappybird-popup-content, .cardflip-popup-content {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    gap: 10px;
}

.tapcoins-popup-congratulation img, .flappybird-popup-content img, .cardflip-popup-content img {
    width: 100%;
}

.score {
    color: #ff6b35;
    font-weight: 700;
    font-size: 22px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.copy-share {
    background: linear-gradient(135deg, #4285f4, #34a3f1);
}

.fb-share {
    background: linear-gradient(135deg, #1877f2, #0f5a9e);
    text-decoration: none;
}
.copy-share, .fb-share, .close-reward {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
.close-tap {
    background: #ff4757;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
}
.flappybird-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}
.flappybird-gamearea {
    max-width: 500px;
    height: 50vh !important;
    background: black !important;
    position: relative !important;
    overflow: hidden !important;
}
.flappybird-ceiling,
.flappybird-floor {
    position: absolute;
    left: 0;
    width: 100%;
    height: 33px;
    background: url('/images/video/flappy-bird/hell.webp') center/cover;
    background-size: 512px 33px;
    z-index: 100;
}
.flappybird-ceiling {
    top: 0;
}
.flappybird-floor {
    bottom: 0;
}
.flappybird-bird {
    position: absolute;
    width: 30px;
    height: 30px;
    left: 50px;
    z-index: 102;
    transition: top 0.01s linear;
}
.flappybird-bird-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.flappybird-pipe-top,
.flappybird-pipe-bottom {
    position: absolute;
    width: 60px;
    z-index: 99;
    transition: left 0.05s linear;
}
.flappybird-pipe-top {
    top: 33px;
}
.flappybird-pipe-bottom {
    bottom: 33px;
}
.flappybird-pipe-img {
    width: 60px;
    height: 100%;
    display: block;
}
.flappybird-item {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 101;
    transition: left 0.05s linear;
}
.flappybird-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.flappybird-item-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flappybird-item-display img {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    transition: 0.3s;
    animation: glow 3s 
    ease-in-out infinite;
}
.flappybird-item-display span {
    font-size: 14px;
}
.cardflip-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}
.cardflip-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    box-sizing: border-box;
}
.cardflip-card {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
    aspect-ratio: 5 / 7;
}
.cardflip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.cardflip-front,
.cardflip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cardflip-front {
    background-image: url('/images/video/card-flip/fantasy_card_back.webp');
    background-size: cover;
    background-position: center;
}
.cardflip-back {
    background: #fff;
    transform: rotateY(180deg);
}
.cardflip-back img {
    width: 100%;
    padding: 5px;
    border-radius: 10px;
}
.cardflip-card.flipped .cardflip-inner {
    transform: rotateY(180deg);
    animation: glow 2s ease-in-out infinite;
    border-radius: 10px;
}
.cardflip-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.cardflip-item-display {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cardflip-item-display img {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    transition: 0.3s;
    animation: glow 3s ease-in-out infinite;
}
.cardflip-item-display span {
    font-size: 14px;
}
@keyframes glow {
    0% {
        box-shadow: 0 0 5px yellow, 0 0 10px yellow;
    }
    100% {
        box-shadow: 0 0 10px orange, 0 0 15px orange;
    }
}
.game-timer {
    position: absolute;
    top: 40px;
    right: 20px;
    z-index: 103;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(/images/video/card-flip/game-timer-card-flip.webp);
    background-size: cover;
}
.timer-number {
    display: inline-block;
    transition: transform 0.2s ease;
}