/*
 * =====================================================
 * BIRDSONG DETECTIVE - IMMERSIVE MODAL EXPERIENCE
 * Full-screen, professional, distraction-free
 * =====================================================
 */

/* Override default modal to be full-screen and immersive */
#activityModal.detective-immersive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 99999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Hide default modal header and close button */
#activityModal.detective-immersive .modal-header,
#activityModal.detective-immersive .modal-close {
    display: none !important;
}

#activityModal.detective-immersive .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    background: transparent;
    box-shadow: none;
}

#activityModal.detective-immersive .modal-body {
    padding: 0;
    height: 100%;
    overflow: visible;
}

/* Top Navigation Bar */
.detective-modal-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detective-modal-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.detective-modal-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2C5530 0%, #3d7545 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.detective-modal-brand-text h2 {
    font-size: var(--text-xl);
    color: var(--detective-primary);
    margin: 0;
    font-weight: 700;
}

.detective-modal-brand-text p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.detective-modal-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.detective-close-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: transparent;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 300;
}

.detective-close-btn:hover {
    background: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error);
    transform: scale(1.05);
}

/* Main Content Area - Scrollable */
.detective-modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: transparent;
}

/* Custom Scrollbar */
.detective-modal-content::-webkit-scrollbar {
    width: 12px;
}

.detective-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.detective-modal-content::-webkit-scrollbar-thumb {
    background: var(--detective-primary);
    border-radius: 6px;
}

.detective-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--detective-primary-dark);
}

/* Inner Container for Content - Centered with even padding */
.detective-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-6);
}

/* Welcome Screen Override - Enhanced with Animation */
.detective-welcome-hero {
    background: linear-gradient(135deg, #2C5530 0%, #3d7545 50%, #FFB347 100%) !important;
    background-size: 200% 200% !important;
    animation: gradientShift 6s ease infinite !important;
    color: white !important;
    border: none !important;
    padding: var(--space-5) var(--space-6) !important;
    border-radius: var(--radius-2xl) !important;
    text-align: center;
    margin-bottom: var(--space-4);
    box-shadow: 0 15px 50px rgba(44, 85, 48, 0.3);
    position: relative;
    overflow: hidden;
}

.detective-welcome-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulseGlow 4s ease-in-out infinite;
}

.detective-welcome-hero h2 {
    color: white !important;
    font-family: var(--font-heading) !important;
    font-size: 2.5rem !important;
    margin-bottom: var(--space-2) !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: slideInDown 0.6s ease-out;
    position: relative;
    z-index: 1;
}

.detective-welcome-hero p {
    color: rgba(255, 255, 255, 0.98) !important;
    font-size: var(--text-base);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Mini-Bar in Nav */
.detective-mini-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-secondary);
}

.detective-mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--detective-primary), var(--detective-accent));
    transition: width var(--transition-base);
}

/* Responsive */
@media (max-width: 768px) {
    .detective-modal-nav {
        height: 60px;
        padding: 0 var(--space-2);
    }
    
    .detective-modal-brand-text h2 {
        font-size: var(--text-lg);
    }
    
    .detective-modal-brand-text p {
        display: none;
    }
    
    .detective-content-wrapper {
        padding: var(--space-3) var(--space-2);
    }
    
    .detective-close-btn {
        width: 40px;
        height: 40px;
    }
}

/* Animation for modal entrance */
@keyframes modalSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#activityModal.detective-immersive.show {
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ensure content cards have proper spacing and elevation */
.detective-modal-content .detective-card {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all var(--transition-base);
}

.detective-modal-content .detective-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

