body {
    margin: 0;
    padding: 0;
    background-color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

#Container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 678px;
    max-height: 850px; 
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

#invitacionContainer {
    position: absolute;
    width: 371px;
    height: 678px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 200%;
    animation: fadeIn 5s ease-in-out forwards, randomPingPong 60s ease-in-out infinite; 
    margin: 0 auto;
}


@supports (-webkit-touch-callout: none) {

    #Container {
        position: absolute; 
        top: 0; 
        left: 50%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        max-height: calc(100% - env(safe-area-inset-bottom));
        display: block;
    }

    #invitacionContainer {
        left: 2.7%
    }
}

#blurredBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(25px);
    z-index: -1000; 
    animation: fadeIn 4s ease-in-out forwards, pingPong 120s ease-in-out infinite;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; 
}
.modal-content {
    width: 90%; 
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 24px; 
    font-weight: bold; 
    font-family: 'Arial', sans-serif; 
}
.modal-backdrop {
    z-index: 1; 
}

.modal-icon {
    color: #fff;
    margin-bottom: 20px;
    font-size: 72px;
    cursor: pointer;
}

#playModal {
    display:none;
    z-index: 1051;
}

#playModal .modal-content {
    width: 100%;
    height: 80%;
    background: transparent;
    border: none;
}
#playModal .modal-icon {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Debug Messages */
#Debug {
    position: absolute;
    display:none;
    width: 90%;
    top: 0%;
    left: 5%;
    background: rgba(218, 255, 55, 0.7);
    padding: 10px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
}

#Debug #DebugContent {
    position: relative;
    overflow-wrap: break-word;
    width: 100%; 
    height: 100%;
}


/* Countdown Timer*/

#countdownTimer {
    position: absolute;
    width: 95%;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

.time-section {
    display: flex;
    gap: 18px; 
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: transparent;            
}

.time-label {
    font-size: 0.6em;
    opacity: 0.7;
    width: 60px;
    background-color: transparent;    
}

#countdownMessage {
    font-size: 1em;
    font-weight: bold;
    color: #FFD700; /* Dorado */
    text-align: center;
    margin-bottom: 0px;
    animation: fadeInOut 5s ease-in-out infinite;
    opacity: 0.9;
}

/* Loader container */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Logo */
#loader-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

/* Rainbow spinner */
.rainbow-spinner {
    width: 50px;
    height: 50px;
    border: 6px solid transparent;
    border-top: 6px solid red;
    border-radius: 50%;
    animation: spin 1s linear infinite, rainbow 3s linear infinite;
}


/* Adjust logo size for portrait orientation */
@media (orientation: portrait) {
    #loader-logo {
        width: 50vw; /* 50% of the viewport width */
    }
}
