/* NOVA PROMOTIONAL POPUP STYLES — PRO VERSION 5.3 */
.nova-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 0, 20, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    padding: clamp(16px, 4vw, 40px);
}

.nova-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nova-popup-card {
    position: relative;
    background: #0a0a0f;
    border-radius: 32px;
    border: 3px solid transparent;
    background-image: linear-gradient(#0a0a0f, #0a0a0f), 
                      linear-gradient(135deg, #00b4d8, #9333ea, #00b4d8);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 200% 200%;
    animation: rgb-border 4s linear infinite;
    
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 180, 216, 0.15);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    max-width: 95vw;
    max-height: 90vh;
}

@keyframes rgb-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nova-popup-overlay.active .nova-popup-card {
    transform: scale(1);
}

.nova-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.nova-popup-close:hover {
    background: #ef4444;
    transform: rotate(90deg) scale(1.1);
    border-color: transparent;
}

.nova-popup-media-container {
    flex: 1;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.nova-popup-media-container img,
.nova-popup-media-container video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ADAPTABLE RATIOS */
.nova-popup-card.nova-popup-landscape {
    width: min(92vw, 980px);
    aspect-ratio: auto;
}
.nova-popup-card.nova-popup-landscape .nova-popup-media-container {
    aspect-ratio: 16 / 9;
}

.nova-popup-card.nova-popup-portrait {
    width: min(92vw, 520px);
}
.nova-popup-card.nova-popup-portrait .nova-popup-media-container {
    aspect-ratio: 9 / 16;
    max-height: 70vh;
}

.nova-popup-card.nova-popup-square {
    width: min(92vw, 650px);
}
.nova-popup-card.nova-popup-square .nova-popup-media-container {
    aspect-ratio: 1 / 1;
}

.nova-popup-content {
    padding: 16px 24px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(10,10,15,0.8) 0%, rgba(10,10,15,0.98) 100%);
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.nova-popup-note {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.nova-popup-note:empty { display: none; }

.nova-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #00b4d8, #9333ea);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    box-shadow: 0 8px 20px rgba(0, 180, 216, 0.3);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.nova-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 180, 216, 0.5);
    filter: brightness(1.1);
}

.nova-popup-sound-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    transition: all 0.2s ease;
}

.nova-popup-sound-btn:hover {
    background: rgba(0, 180, 216, 0.8);
    transform: scale(1.05);
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 900px) {
    .nova-popup-overlay {
        padding: 12px;
    }
    .nova-popup-card {
        border-radius: 24px;
        max-height: 88vh;
    }
    .nova-popup-card.nova-popup-landscape,
    .nova-popup-card.nova-popup-portrait,
    .nova-popup-card.nova-popup-square {
        width: min(94vw, 420px);
    }
    .nova-popup-card.nova-popup-portrait .nova-popup-media-container {
        aspect-ratio: 9 / 16;
        max-height: calc(88vh - 120px);
    }
    .nova-popup-card.nova-popup-landscape .nova-popup-media-container {
        aspect-ratio: 16 / 9;
    }
    .nova-popup-content {
        padding: 14px 18px 18px;
    }
    .nova-popup-note {
        font-size: 0.9rem;
    }
}

/* Support for safe areas */
@supports (padding: env(safe-area-inset-bottom)) {
    .nova-popup-overlay {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}
