/* ===================================================
   LEETLAUNCH POPUP MODAL & CYBER GLITCH ENTRANCE
   =================================================== */

:root {
    --ll-cyan: #00f0ff;
    --ll-green: #00ff9d;
    --ll-pink: #ff0055;
    --ll-dark: #070d14;
    --ll-border-glow: rgba(0, 240, 255, 0.35);
}

/* ===================================================
   1. FULL SCREEN GLITCH OVERLAY (Flash burst)
   =================================================== */
.ll-screen-glitch {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.ll-screen-glitch.glitching {
    visibility: visible;
    animation: llScreenGlitchBurst 0.48s steps(2, start) forwards;
}

.ll-screen-glitch::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 240, 255, 0.15) 0px,
        rgba(0, 240, 255, 0.15) 2px,
        transparent 2px,
        transparent 4px
    );
    opacity: 0.75;
}

.ll-screen-glitch::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 0, 85, 0.18) 0%,
        rgba(0, 240, 255, 0.25) 50%,
        rgba(0, 255, 157, 0.18) 100%
    );
    mix-blend-mode: color-dodge;
}

@keyframes llScreenGlitchBurst {
    0% {
        opacity: 0.95;
        transform: translate(0, 0) scale(1.02) skewX(2deg);
        clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%);
        filter: hue-rotate(90deg) contrast(2.2);
    }
    20% {
        opacity: 0.8;
        transform: translate(-10px, 6px) scale(0.99) skewX(-3deg);
        clip-path: polygon(0 55%, 100% 55%, 100% 75%, 0 75%);
        filter: hue-rotate(-90deg) invert(0.2);
    }
    40% {
        opacity: 0.9;
        transform: translate(8px, -4px) scale(1.01) skewX(1deg);
        clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%, 0 80%, 100% 80%, 100% 95%, 0 95%);
        filter: hue-rotate(180deg) saturate(3);
    }
    65% {
        opacity: 0.6;
        transform: translate(-4px, 2px) scale(1);
        clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%);
        filter: none;
    }
    85% {
        opacity: 0.3;
        transform: translate(0, 0);
        clip-path: none;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        clip-path: none;
    }
}

/* ===================================================
   2. MODAL BACKDROP
   =================================================== */
.ll-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.ll-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===================================================
   3. POPUP CARD & GLITCH EMERGENCE
   =================================================== */
.ll-popup-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: linear-gradient(145deg, rgba(13, 22, 33, 0.94) 0%, rgba(6, 11, 18, 0.97) 100%);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 24px;
    padding: 2rem 1.85rem;
    box-shadow: 
        0 0 35px rgba(0, 240, 255, 0.2),
        0 25px 60px rgba(0, 0, 0, 0.85),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transform: scale(0.6) translateY(20px);
    opacity: 0;
    overflow: hidden;
}

/* Active Glitch Entrance */
.ll-popup-backdrop.active .ll-popup-card {
    animation: llCardGlitchIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Close exit animation */
.ll-popup-backdrop.closing .ll-popup-card {
    transform: scale(0.85) translateY(15px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 1, 1), opacity 0.2s ease-in;
}

/* Keyframe for Glitch In Materialization */
@keyframes llCardGlitchIn {
    0% {
        opacity: 0;
        transform: scale(0.65) translate(-18px, 15px) skewX(8deg);
        clip-path: polygon(0 15%, 100% 15%, 100% 35%, 0 35%);
        filter: drop-shadow(-8px 0 #ff0055) drop-shadow(8px 0 #00f0ff) contrast(2);
    }
    18% {
        opacity: 0.95;
        transform: scale(0.85) translate(14px, -10px) skewX(-7deg);
        clip-path: polygon(0 60%, 100% 60%, 100% 82%, 0 82%);
        filter: drop-shadow(6px 0 #ff0055) drop-shadow(-6px 0 #00f0ff) hue-rotate(180deg);
    }
    35% {
        opacity: 0.85;
        transform: scale(0.94) translate(-8px, 6px) skewX(4deg);
        clip-path: polygon(0 5%, 100% 5%, 100% 40%, 0 40%, 0 70%, 100% 70%, 100% 95%, 0 95%);
        filter: drop-shadow(-4px 0 #00ff9d) drop-shadow(4px 0 #00f0ff);
    }
    52% {
        opacity: 1;
        transform: scale(1.04) translate(3px, -2px) skewX(-2deg);
        clip-path: none;
        filter: drop-shadow(3px 0 #00f0ff) drop-shadow(-3px 0 #ff0055);
    }
    70% {
        transform: scale(0.99) translate(-2px, 1px) skewX(1deg);
        filter: drop-shadow(-1px 0 #00ff9d);
    }
    85% {
        transform: scale(1.01) translate(0, 0) skewX(0);
        filter: none;
    }
    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0) skewX(0);
        filter: none;
        clip-path: none;
    }
}

/* Holographic Sweep Line on Card */
.ll-popup-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ll-cyan), var(--ll-green), transparent);
    box-shadow: 0 0 12px var(--ll-cyan);
    opacity: 0;
    pointer-events: none;
}

.ll-popup-backdrop.active .ll-popup-scanline {
    animation: llScanlineSweep 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.15s 1;
}

@keyframes llScanlineSweep {
    0% {
        top: 0%;
        opacity: 1;
    }
    90% {
        top: 100%;
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Ambient Cyber Glow Corner */
.ll-popup-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, rgba(0, 255, 157, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(20px);
}

.ll-popup-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(20px);
}

/* Close Button */
.ll-popup-close-btn {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.ll-popup-close-btn:hover {
    background: rgba(255, 75, 75, 0.2);
    border-color: rgba(255, 95, 95, 0.5);
    color: #ff5f5f;
    transform: rotate(90deg) scale(1.1);
}

.ll-popup-close-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

/* Header & Badge */
.ll-popup-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.ll-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ll-cyan);
}

.ll-popup-pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--ll-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--ll-green);
    animation: llDotPulse 1.8s infinite;
}

@keyframes llDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

/* Event Title & Subtitle */
.ll-popup-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.4rem 0;
    letter-spacing: -0.02em;
    background: linear-gradient(100deg, #ffffff 15%, var(--ll-cyan) 65%, var(--ll-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    position: relative;
}

.ll-popup-subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 1.25rem 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.45;
}

/* Info Grid Feature Strip */
.ll-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

.ll-popup-info-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.ll-popup-info-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.04);
}

.ll-popup-info-icon {
    font-size: 1.1rem;
    color: var(--ll-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.ll-popup-info-text {
    display: flex;
    flex-direction: column;
}

.ll-popup-info-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}

.ll-popup-info-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
}

/* Highlights Box */
.ll-popup-highlights {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(0, 255, 157, 0.03));
    border-left: 3px solid var(--ll-cyan);
    border-radius: 0 10px 10px 0;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.ll-popup-highlights span {
    color: var(--ll-green);
    font-weight: 600;
}

/* Actions Section */
.ll-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ll-popup-btn-primary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.4rem;
    background: linear-gradient(135deg, #00f0ff 0%, #00ff9d 100%);
    color: #03080e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.ll-popup-btn-primary:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.65), 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #000000;
}

.ll-popup-btn-primary:active {
    transform: scale(0.98);
}

.ll-popup-btn-primary .btn-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ll-popup-btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.ll-popup-dismiss-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    text-align: center;
    cursor: pointer;
    padding: 0.3rem;
    transition: color 0.2s;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ll-popup-dismiss-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .ll-popup-card {
        padding: 1.6rem 1.3rem;
        border-radius: 20px;
    }
    
    .ll-popup-title {
        font-size: 1.5rem;
    }
    
    .ll-popup-subtitle {
        font-size: 0.85rem;
    }

    .ll-popup-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}
