/*
 * =====================================================
 * BIRDSONG DETECTIVE V2 - PREMIUM UI ENHANCEMENTS
 * Modern, Professional, Engaging Design
 * =====================================================
 */

/* =====================================================
   1. GLASSMORPHISM EFFECTS
   ===================================================== */

.detective-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(224, 224, 224, 0.6) !important;
    position: relative;
    overflow: visible !important;
}

.detective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2C5530, #FFB347, #2C5530);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.detective-card:hover::before {
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.detective-card-elevated {
    box-shadow: 0 20px 40px rgba(44, 85, 48, 0.12), 0 10px 20px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detective-card-elevated:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 60px rgba(44, 85, 48, 0.18), 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* =====================================================
   2. ENHANCED STEP INDICATOR
   ===================================================== */

.detective-step-indicator {
    position: relative;
    padding: var(--space-4) 0;
}

.detective-step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(44, 85, 48, 0.2) 0%, 
        rgba(44, 85, 48, 0.5) 50%, 
        rgba(44, 85, 48, 0.2) 100%);
    transform: translateY(-50%);
    z-index: 0;
}

.detective-step {
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detective-step:hover .detective-step-circle {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 16px rgba(44, 85, 48, 0.3);
}

.detective-step.active .detective-step-circle {
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 4px rgba(44, 85, 48, 0.2), 0 0 20px rgba(44, 85, 48, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(44, 85, 48, 0.2), 0 0 20px rgba(44, 85, 48, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(44, 85, 48, 0.1), 0 0 30px rgba(44, 85, 48, 0.4);
    }
}

.detective-step.completed .detective-step-circle {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* =====================================================
   3. PREMIUM BUTTONS WITH RIPPLE EFFECT
   ===================================================== */

.detective-btn {
    position: relative;
    overflow: hidden;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    text-transform: none;
}

.detective-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.detective-btn:active::after {
    width: 300px;
    height: 300px;
}

.detective-btn-primary {
    background: linear-gradient(135deg, #2C5530 0%, #3d7545 100%) !important;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

.detective-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3d7545 0%, #2C5530 100%) !important;
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.4);
    transform: translateY(-2px) scale(1.02);
}

.detective-btn-lg {
    padding: var(--space-3) var(--space-6) !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
}

/* =====================================================
   4. FLOATING LABELS & ENHANCED INPUTS
   ===================================================== */

.detective-form-group {
    position: relative;
    margin-bottom: var(--space-4);
}

.detective-input,
.detective-textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(224, 224, 224, 0.8) !important;
}

.detective-input:focus,
.detective-textarea:focus {
    border-color: #2C5530 !important;
    box-shadow: 0 0 0 4px rgba(44, 85, 48, 0.1), 0 4px 12px rgba(44, 85, 48, 0.15) !important;
    transform: translateY(-2px);
}

.detective-input-hint {
    font-size: 0.875rem;
    color: #757575;
    margin-top: var(--space-1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.detective-input-hint::before {
    content: '💡';
    font-size: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* =====================================================
   5. AUDIO PLAYER ENHANCEMENT
   ===================================================== */

.detective-audio-player {
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05) 0%, rgba(255, 179, 71, 0.05) 100%);
    border: 2px solid rgba(44, 85, 48, 0.2);
    border-radius: 16px;
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
}

.detective-audio-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.detective-audio-player:hover::before {
    left: 100%;
}

.play-mystery-btn {
    position: relative;
    background: linear-gradient(135deg, #2C5530, #3d7545) !important;
    border: none !important;
    padding: var(--space-3) var(--space-5) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.play-mystery-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(44, 85, 48, 0.4);
}

.play-mystery-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* =====================================================
   6. BIRD CARD PREMIUM DESIGN
   ===================================================== */

.bird-comparison-grid {
    gap: var(--space-4) !important;
}

.bird-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(224, 224, 224, 0.6) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bird-card:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg) !important;
    box-shadow: 0 20px 40px rgba(44, 85, 48, 0.2) !important;
    border-color: rgba(255, 179, 71, 0.8) !important;
}

.bird-card.selected {
    border-color: #4CAF50 !important;
    background: linear-gradient(135deg, rgba(232, 245, 233, 0.95) 0%, rgba(76, 175, 80, 0.1) 100%) !important;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2), 0 12px 24px rgba(76, 175, 80, 0.3) !important;
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2), 0 12px 24px rgba(76, 175, 80, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.3), 0 16px 32px rgba(76, 175, 80, 0.4);
    }
}

.bird-image-container {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.bird-card:hover .bird-image-container {
    transform: scale(1.05);
}

.bird-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bird-card:hover .bird-image {
    transform: scale(1.1) rotate(2deg);
}

/* =====================================================
   7. PROGRESS BAR ENHANCEMENT
   ===================================================== */

.detective-mini-progress-fill {
    background: linear-gradient(90deg, #2C5530 0%, #3d7545 50%, #FFB347 100%) !important;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.3);
    position: relative;
}

.detective-mini-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    /* Removed infinite animation - only animate on progress change */
    animation: none;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =====================================================
   8. TOOLTIP SYSTEM
   ===================================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(33, 33, 33, 0.95);
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1000;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(33, 33, 33, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* =====================================================
   9. LOADING SKELETON
   ===================================================== */

@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

/* =====================================================
   10. CELEBRATION EFFECTS
   ===================================================== */

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #FFB347;
    top: -10px;
    z-index: 10000;
    animation: confetti-fall 3s linear forwards;
}

/* =====================================================
   11. MICRO-INTERACTIONS
   ===================================================== */

.detective-card-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: all 0.3s !important;
}

.detective-card-title svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detective-card:hover .detective-card-title svg {
    transform: scale(1.2) rotate(360deg);
}

/* =====================================================
   12. RESPONSIVE ENHANCEMENTS
   ===================================================== */

@media (max-width: 768px) {
    .detective-card-elevated:hover {
        transform: translateY(-3px) scale(1.005);
    }
    
    .bird-card:hover {
        transform: translateY(-4px) scale(1.02) !important;
    }
}

/* =====================================================
   13. SMOOTH SCROLL BEHAVIOR
   ===================================================== */

.detective-modal-content {
    scroll-behavior: smooth;
}

/* =====================================================
   14. CUSTOM SCROLLBAR
   ===================================================== */

.detective-modal-content::-webkit-scrollbar {
    width: 10px;
}

.detective-modal-content::-webkit-scrollbar-track {
    background: rgba(245, 245, 245, 0.5);
    border-radius: 10px;
}

.detective-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2C5530 0%, #3d7545 100%);
    border-radius: 10px;
    transition: background 0.3s;
}

.detective-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3d7545 0%, #FFB347 100%);
}

