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

body {
    background-color: #000;
    font-family: sans-serif;
}

.container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background {
    width: 600px; /* Fixed width to match mobile-style banners */
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Logo Positioning */
.logo {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.logo img {
    width: 220px;
    height: auto;
}

/* Ornament Layout */
.ornament-wrapper {
    position: absolute;
    top: -16%; /* Starts from the top to allow strings to hang down */
    width: 100%;
    height: 50%;
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
}

.ornament {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18%;

    position: relative;
}

/* The Hanging String */
.string {
    width: 1px;
    background: rgba(255, 255, 255, 0.5);
    height: 100px; /* Base height */
}

.ball {
    width: 100%;
    max-width: 85px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.point {
    width: 90%;
    max-width: 130px;
    margin-top: -55px; /* Overlaps slightly with the ball */
    z-index: 3;
    cursor: pointer;
}

/* Staggered Heights to match the image layout */
.item-1 .string { height: 180px; } /* Far Left - Low */
.item-2 .string { height: 120px; } /* Mid Left - High */
.item-3 .string { height: 160px; } /* Center - Mid */
.item-4 .string { height: 110px; } /* Mid Right - Highest */
.item-5 .string { height: 190px; } /* Far Right - Low */

/* Footage/Bottom Rewards Area */
.footage {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
}

.footage img {
    width: 70%;
    height: auto;
}

/* Animation for the floating effect */
.ornament {
    animation: float 4s ease-in-out infinite alternate;
}

.item-1 { animation-delay: 0s; }
.item-2 { animation-delay: 0.5s; }
.item-3 { animation-delay: 0.2s; }
.item-4 { animation-delay: 0.8s; }
.item-5 { animation-delay: 0.3s; }

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(10px); }
}

/* --- POP-UP SYSTEM --- */

/* 1. The Full Screen Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensures it is on top of everything */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Class to trigger showing the popup via JavaScript */
.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.hidden {
    display: none !important;
}
/* 2. Container for the Pop-up Content */
.popup-content {
    position: relative;
    top: -35px;
    width: 90%;
    max-width: 550px; 
    text-align: center;
    transform: scale(0.7); /* Starts smaller for a "pop" effect */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.visible .popup-content {
    transform: scale(1); /* Scales up when visible */
}

/* 3. Logic for switching between Success and Failure states */
.popup-state {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.popup-state.active {
    display: flex; /* Shown when the 'active' class is added */
}
.popup-state img{
    top: -10%;
}
/* 4. The main graphic (the frame/box) */
.popup-image {
    width: 100%;
    height: auto;
    display: block;
    
}
.popup-image-try {
    width: 80%;
    display: block;
}

/* 5. The Golden Buttons inside the Pop-up */
.popup-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    top: 100%; /* Adjust this to move button up or down on the graphic */
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    max-width: 250px;
    transition: transform 0.2s ease;
}


.popup-button:hover {
    transform: translateX(-50%) scale(1.05); /* Slight grow on hover */
}

.popup-button:active {
    transform: translateX(-50%) scale(0.95); /* Slight shrink on click */
}

.popup-button img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- MOBILE RESPONSIVE ADJUSTMENTS --- */

@media (max-width: 550px) {
    /* Make the points bigger on mobile */
    .point {
        width: 110%;      /* Increase width from 90% */
        max-width: 180px;  /* Increase max-width from 130px */
        margin-top: -65px; /* Adjust overlap since image is larger */
        transition: transform 0.3s ease;
    }

    /* Adjust ornament width so points don't overlap each other too much */
    .ornament {
        width: 20%;
    }

    /* Optional: Make the balls slightly bigger to match */
    .ball {
        max-width: 100px;
    }

    /* Make the logo slightly smaller to give points more room */
    .logo img {
        width: 180px;
    }
}

/* Extra boost for very small screens (under 400px) */
@media (max-width: 400px) {
    .point {
        width: 120%;
        max-width: 150px;
        margin-top: -60px;
    }
}