/* AI Scanner & Loading Animations */

/* The Overlay */
.scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95); /* Darker background for contrast */
    backdrop-filter: blur(20px);
    z-index: 9999; /* High z-index to ensure it's on top */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Active state for overlay */
.scan-overlay.active {
    opacity: 1;
    pointer-events: all;
    display: flex !important; /* Override any .hidden class */
}

/* The Scanner Circle */
.scanner-box {
    position: relative;
    width: 250px !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem auto;
    flex-shrink: 0;
}

/* Rotating Rings */
.scanner-box::before, .scanner-box::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    box-sizing: border-box;
}

.scanner-box::before {
    width: 100%;
    height: 100%;
    border-top-color: #8B5CF6;
    border-right-color: #8B5CF6;
    animation: spin 2s linear infinite;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.scanner-box::after {
    width: 70%;
    height: 70%;
    border-bottom-color: #EC4899;
    border-left-color: #EC4899;
    animation: spin-reverse 1.5s linear infinite;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

/* The Central Pulse */
.radar-blip {
    position: relative;
    width: 60px !important;
    height: 60px !important;
    min-height: 60px !important;
    background: radial-gradient(circle, #8B5CF6 0%, rgba(139, 92, 246, 0.3) 50%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    z-index: 1;
    flex-shrink: 0;
}

/* Scanning Line (Search effect) */
.scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    animation: scan-vertical 3s ease-in-out infinite;
    z-index: 2;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes pulse-glow {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

@keyframes scan-vertical {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Paywall Blur & Status */
.paywall-blur .user-list {
    filter: blur(8px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    transition: all 0.5s ease;
}

.paywall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(2, 6, 23, 0.4);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.paywall-content {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    animation: slideUp 0.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

/* Status Card Animation */
.status-card.processing {
    position: relative;
}

.status-card.processing::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 100%;
    animation: loading-bar 2s infinite ease-in-out;
}

@keyframes loading-bar {
    0% { width: 0%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0%; left: 100%; }
}
