/* Glassmorphism Info Panel Styles with Staged Reveal */
@import url('https://fonts.cdnfonts.com/css/thegoodmonolith');
/* Overlay background */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main info panel with glassmorphism */
.info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 25px 45px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.1) inset,
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Content styling with staged reveal */
#info-content {
    font-family: 'TheGoodMonolith', sans-serif;
    color: #ffffff;
    padding: 40px 35px;
    position: relative;
}

/* Title styling with immediate show + glow */
#info-content h2 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Glowing white text */
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2);
    
    line-height: 1.2;
    letter-spacing: -0.02em;
    animation: titleGlow 3s ease-in-out infinite;
    
    /* Title appears immediately */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtitle styling with delayed reveal */
#info-content h3 {
    margin: 0 0 25px 0;
    font-size: 1.1rem;
    font-weight: 500;
    
    /* Subtle glow for subtitle */
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.4),
        0 0 15px rgba(255, 255, 255, 0.2);
    
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* Delayed reveal animation */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.info-panel.active #info-content h3 {
    opacity: 1;
    transform: translateY(0);
}

/* Content text styling with more delayed reveal */
#info-content p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 400;
    
    /* Soft glowing text */
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.3),
        0 0 10px rgba(255, 255, 255, 0.1);
    
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Most delayed reveal animation */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.info-panel.active #info-content p {
    opacity: 1;
    transform: translateY(0);
}

/* Close button with glassmorphism */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    
    /* Glassmorphism button */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Glowing white X */
    color: #ffffff;
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 15px rgba(255, 255, 255, 0.4);
    
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Ensure button is always clickable */
    pointer-events: auto !important;
    z-index: 1001 !important;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
}

.close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* Add the × symbol */
.close-btn::before {
    content: '×';
    display: block;
    line-height: 38px;
}

/* Scrollbar styling for webkit browsers */
.info-panel::-webkit-scrollbar {
    width: 6px;
}

.info-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.info-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Glow animation for title */
@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 25px rgba(255, 255, 255, 0.8),
            0 0 35px rgba(255, 255, 255, 0.6),
            0 0 45px rgba(255, 255, 255, 0.3);
    }
}

/* Panel entrance animation */
@keyframes panelEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotateY(15deg);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
        filter: blur(0px);
    }
}

.info-panel.active {
    animation: panelEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive design */
@media (max-width: 768px) {
    .info-panel {
        width: 95%;
        margin: 0 10px;
    }
    
    #info-content {
        padding: 30px 25px;
    }
    
    #info-content h2 {
        font-size: 1.8rem;
    }
    
    #info-content h3 {
        font-size: 1rem;
    }
    
    #info-content p {
        font-size: 1rem;
    }
}