/* Common Styles */
.balloon-game-container,
.scratch-card-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.instant-games-content {
	margin-bottom:30px!important;
}

.balloon-game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-image: url('https://diamonddraws.com/wp-content/uploads/2025/01/Untitled-design-20.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.balloon-game-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.balloons-grid {
    display: grid;
    grid-template-columns: repeat(4, 120px);
    gap: 20px;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Define balloon colors */
.balloon:nth-child(7n+1) .balloon-shape {
    fill: #FF3366; /* Vibrant pink */
}
.balloon:nth-child(7n+2) .balloon-shape {
    fill: #33CC66; /* Fresh lime green */
}
.balloon:nth-child(7n+3) .balloon-shape {
    fill: #FF9933; /* Bright orange */
}
.balloon:nth-child(7n+4) .balloon-shape {
    fill: #6633FF; /* Rich purple */
}
.balloon:nth-child(7n+5) .balloon-shape {
    fill: #33CCFF; /* Sky blue */
}
.balloon:nth-child(7n+6) .balloon-shape {
    fill: #FFDD33; /* Sunny yellow */
}
.balloon:nth-child(7n+7) .balloon-shape {
    fill: #FF66CC; /* Hot pink */
}

.balloon {
    position: relative;
    width: 120px;
    height: 160px;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: floatBalloon 3s ease-in-out infinite;
    z-index: 1;
}

/* Make each balloon float with a slight delay for natural effect */
.balloon:nth-child(7n+1) { animation-delay: 0s; }
.balloon:nth-child(7n+2) { animation-delay: 0.4s; }
.balloon:nth-child(7n+3) { animation-delay: 0.8s; }
.balloon:nth-child(7n+4) { animation-delay: 1.2s; }
.balloon:nth-child(7n+5) { animation-delay: 1.6s; }
.balloon:nth-child(7n+6) { animation-delay: 2.0s; }
.balloon:nth-child(7n+7) { animation-delay: 2.4s; }

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

/* Stop floating animation when popped */
.balloon.popped {
    animation: none;
}

/* Ensure popping animation overrides floating */
.balloon.popping {
    animation: pop 0.3s ease-out !important;
}

.balloon:hover {
    transform: scale(1.05);
}

.balloon-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.balloon-front {
    position: absolute;
    width: 100%;
    height: 100%;
}

.balloon-front svg {
    width: 100%;
    height: 100%;
    display: block;
}

.balloon-front svg .balloon-shape {
    fill: white;
    stroke: none;
}

.balloon-front svg image {
    opacity: 0.9;
}

.balloon-back {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prize-text {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    display: inline-block !important;
    width: 100% !important;
}

.prize-text i {
    color: #f7c948 !important;
    margin-right: 8px !important;
    font-size: 16px !important;
}

.prize-text.winner {
    color: #000 !important;
    font-weight: 700 !important;
}

.prize-text.winner i {
    color: #f7c948 !important;
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Firework Effects */
.firework {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform-origin: center;
    animation: fireworkBurst 1s ease-out forwards;
    z-index: 9999;
}

/* Enhance firework colors with stronger glow */
.firework.gold { 
    background: #FFD700; 
    box-shadow: 0 0 20px #FFD700, 0 0 40px #FFD700;
}
.firework.red { 
    background: #FF3366; 
    box-shadow: 0 0 20px #FF3366, 0 0 40px #FF3366;
}
.firework.blue { 
    background: #33CCFF; 
    box-shadow: 0 0 20px #33CCFF, 0 0 40px #33CCFF;
}
.firework.green { 
    background: #33CC66; 
    box-shadow: 0 0 20px #33CC66, 0 0 40px #33CC66;
}
.firework.purple { 
    background: #6633FF; 
    box-shadow: 0 0 20px #6633FF, 0 0 40px #6633FF;
}

@keyframes fireworkBurst {
    0% {
        transform: scale(0.1) translate(0, 0);
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: scale(1.5) translate(var(--tx), var(--ty));
    }
    100% {
        transform: scale(0.1) translate(calc(var(--tx) * 2), calc(var(--ty) * 2));
        opacity: 0;
    }
}

/* Enhanced Firework trails */
.firework::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    filter: blur(4px);
    transform: translate(-50%, -50%);
    animation: trailFade 0.8s ease-out forwards;
    z-index: 9998;
}

@keyframes trailFade {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Enhanced spark effect */
.spark {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 15px white;
    pointer-events: none;
    opacity: 0;
    animation: sparkFly 0.8s ease-out forwards;
    z-index: 9997;
}

@keyframes sparkFly {
    0% {
        transform: scale(1) translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(0.1) translate(var(--tx), var(--ty)) rotate(360deg);
        opacity: 0;
    }
}

/* Remove old particle styles */
.balloon-particle {
    display: none;
}

.balloon-string {
    display: none;
}

.balloon.popped .balloon-front {
    display: none;
}

.balloon.popped .balloon-back {
    opacity: 1;
}

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

/* Mobile Styles */
@media (max-width: 768px) {
    .balloon-game-container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .balloons-grid {
        grid-template-columns: repeat(2, 100px);
        gap: 15px;
    }

    .balloon {
        width: 100px;
        height: 140px;
    }
    
    .prize-text {
        font-size: 16px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .balloons-grid {
        grid-template-columns: repeat(2, 80px);
        gap: 10px;
    }

    .balloon {
        width: 80px;
        height: 120px;
    }
    
    .prize-text {
        font-size: 14px;
    }
}

/* Scratch Card Styles */
.scratch-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.scratch-card-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: white;
    width: 100%;
}

.scratch-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.scratch-card {
    position: relative;
    background: var( --e-global-color-primary );
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scratch-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Ensure surface is above content */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scratch-surface canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.prize-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 0;
    text-align: center;
    z-index: 1; /* Lower than scratch surface but visible */
}

.prize-content .prize-image,
.winner-content .prize-image {
    width: 80%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.prize-content .prize-image img,
.winner-content .prize-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Winner content styling */
.winner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 10px;
}

.winner-content .prize-name {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: black;
  
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

/* Non-winner content styling */
.non-winner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.non-winner-content .no-win-message {
    font-size: 18px;
    font-weight: bold;
    color: #e11e26;
    text-transform: uppercase;
}

/* Prize content with image */
.prize-content.with-image {
    background: white;
}

/* Prize content for non-winners */
.prize-content.no-win {
    background: #f5f5f5;
}

/* Hide ticket number elements */
.ticket-number, 
.prize-content .ticket-info .ticket-number {
    display: none;
}

/* Simplified prize message */
.prize-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .scratch-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .scratch-card-container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .winner-content .prize-image {
        width: 70%;
        max-height: 60%;
    }
    
    .winner-content .prize-name,
    .non-winner-content .no-win-message {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .scratch-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .scratch-card-container h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .winner-content .prize-image {
        width: 85%;
        max-height: 60%;
    }
    
    .winner-content .prize-name,
    .non-winner-content .no-win-message {
        font-size: 14px;
    }
    
    /* Ensure text scales properly on small screens */
    .scratch-surface canvas {
        font-size: 16px !important; /* Override any inline styles */
    }
    
    /* Adjust sizing to prevent overflow on mobile */
    .scratch-card {
        aspect-ratio: 4/3; /* Slightly shorter aspect ratio for mobile */
        height: auto;
    }
}

.no-win-message  {
background:transparent!important;
}

/* Default Instant Prizes Style */
.default-instant-prizes {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.default-instant-prizes h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

/* New Table Styles */
.instant-prizes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.instant-prizes-table thead {
    background-color: #f7c948;
}

.instant-prizes-table th {
    padding: 15px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000 !important;
    text-transform: uppercase !important;
    width: 50% !important;
}

.instant-prizes-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.instant-prizes-table tbody tr:last-child {
    border-bottom: none;
}

.instant-prizes-table tbody tr:hover {
    background-color: #f9f9f9;
}

.instant-prizes-table td {
    padding: 15px;
    font-size: 16px;
    color: #333;
}

.ticket-number-cell,
.prize-cell {
    font-weight: 600 !important;
    width: 50% !important;
    padding: 15px !important;
    font-size: 16px !important;
    color: #333 !important;
    text-align: center !important;
}

.ticket-number-cell i,
.prize-cell i {
    /* Remove direct styling on these */
}

.winner-row {
    background-color: rgba(247, 201, 72, 0.1);
}

.winner-row:hover {
    background-color: rgba(247, 201, 72, 0.2) !important;
}

/* Responsive styles for the table */
@media (max-width: 768px) {
    .default-instant-prizes h2 {
        font-size: 24px;
    }
    
    .instant-prizes-table th,
    .instant-prizes-table td {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .default-instant-prizes h2 {
        font-size: 20px;
    }
    
    .instant-prizes-table th,
    .instant-prizes-table td {
        padding: 10px;
        font-size: 14px;
    }
    
    .ticket-number-cell,
    .prize-cell {
        width: 50%;
    }
}

/* Old list styles - can be removed */
.prizes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.prize-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Common styles */
.instant-prizes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    min-height: 200px;
}

/* Container Loader */
.instant-prizes-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e11e26;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scratch-card {
    position: relative;
    background: var( --e-global-color-primary );
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scratch-card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 0;
}

.scratch-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Ensure surface is above content */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scratch-surface canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.prize-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 0;
    text-align: center;
    z-index: 1; /* Lower than scratch surface but visible */
}

.scratch-card .ticket-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.scratch-card .prize-text.winner {
    color: #f7c948;
    font-weight: bold;
}

/* Responsive adjustments for scratch card prize images */
@media (max-width: 768px) {
    .prize-content .prize-image {
        width: 70%;
    }
}

@media (max-width: 480px) {
    .prize-content .prize-image {
        width: 90%;
    }
}

/* Image container - ensure perfect centering */
.prize-image, 
.winner-content .prize-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}