/* Enhanced Overlay Text Box Styling - Advanced visual effects */

/* Modern glassmorphism effect for the text box */
#right {
    /* Modern glassmorphism styling */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    
    /* Enhanced border radius */
    border-radius: 16px;
    
    /* Subtle inner glow */
    position: relative;
}

/* Subtle inner glow effect */
#right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.04) 100%);
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

/* Content positioning above the glow */
#right > * {
    position: relative;
    z-index: 2;
}

/* Enhanced title styling */
#right .title {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced description styling */
#right .desc {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* Custom scrollbar for the overlay */
#right .desc::-webkit-scrollbar {
    width: 6px;
}

#right .desc::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#right .desc::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#right .desc::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.5) 0%, 
        rgba(255, 255, 255, 0.2) 100%);
}

/* Enhanced hover effects */
#right:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.5),
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

#right:hover::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.06) 100%);
}

/* Dark theme specific enhancements */
#right.dark-theme {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(0, 0, 0, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

#right.dark-theme::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.06) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.03) 100%);
}

/* Light theme specific enhancements */
#right.light-theme {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

#right.light-theme .title {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#right.light-theme .desc {
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Animated background particles effect */
#right.particles::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 100px 100px;
    animation: float-particles 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes float-particles {
    0% {
        background-position: 0% 0%, 0% 0%, 0% 0%;
    }
    100% {
        background-position: 100% 100%, -100% -100%, 50% -50%;
    }
}

/* Enhanced mobile styling */
@media only screen and (max-width: 992px) {
    #right {
        border-radius: 16px 16px 0 0;
        backdrop-filter: blur(25px) saturate(1.3);
        -webkit-backdrop-filter: blur(25px) saturate(1.3);
        box-shadow: 
            0 -8px 32px rgba(0, 0, 0, 0.6),
            0 -2px 16px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    #right::before {
        border-radius: 16px 16px 0 0;
    }
    
    #right .title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    #right .desc {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Performance optimizations */
#right {
    will-change: transform, opacity;
}

#right * {
    will-change: transform, opacity;
}

/* Smooth appearance transition */
#right.loading-complete {
    animation: smooth-appear 0.6s ease-out forwards;
}

@keyframes smooth-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}