/* 1. Full-screen Blur Overlay */
#prakash-launcher-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 15, 40, 0.85); /* Deep blue theme */
    backdrop-filter: blur(8px); /* Blurs the website behind the popup */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* 2. Initial Popup State (With Background Image) */
.launcher-card.new-year-design {
    /* Path to your 380x650 background image */
    background: url('assets/popup-bg.jpg') no-repeat center center;
    background-size: cover;
    
    /* Fixed Dimensions to ensure 1:1 fit with game canvas */
    width: min(90vw, 520px);
    aspect-ratio: 4 / 5;   /* ✅ Maintains 4:5 ratio */
    height: auto; 
    
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid #0077ff; /* Blue border matching your UI */
    
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Pushes the button to the bottom */
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden; /* Important to keep the iframe inside rounded corners */
}

/* 3. Game Running State (Removes Image to Fix Borders) */
.launcher-card.game-running {
    background: #000814 !important; /* Matches your game's dark night sky */
    background-image: none !important; 
    width: 380px;
    height: 650px;
    padding: 0 !important;
    border: 0px solid #0077ff;
    box-shadow: 0 0 40px rgba(0, 119, 255, 0.4);
}

/* 4. The "Play & Win" Button Styling */
.btn-play-overlay {
    background: linear-gradient(to right, #ffba00, #ff8c00);
    color: white;
    border: none;
    width: 85%;
    padding: 18px 0;
    margin-bottom: 45px; /* Aligns button over the graphic in your image */
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.4);
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 5;
}

.btn-play-overlay:hover {
    transform: scale(1.02);
}

.btn-play-overlay:active {
    transform: translateY(3px);
}

/* 5. Close Button Styling */
.close-x-overlay {
    position: absolute;
    top: 15px; 
    right: 20px;
    font-size: 35px; 
    color: white;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* 6. Iframe Full-Width Fix */
#gameIframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border: none;
    border-radius: 20px;
}

/* 7. Mobile Scaling Logic */
@media (max-width: 400px) {
    .launcher-card.new-year-design, 
    .launcher-card.game-running {
        width: 95vw;
        height: 162vw; /* Maintains the 380/650 ratio on small screens */
    }
}