/*
 * =====================================================
 * BIRDSONG DETECTIVE V2 - COMPONENT SPECIFIC STYLES
 * =====================================================
 */

/* Challenge Header */
.detective-challenge-header {
    margin-bottom: var(--space-4);
}

.challenge-title {
    font-size: var(--text-3xl);
    color: var(--detective-primary);
    margin-bottom: var(--space-1);
}

.challenge-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.challenge-stats {
    display: flex;
    gap: var(--space-3);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-2);
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    min-width: 80px;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--detective-primary);
}

/* Content Area */
.detective-content-area {
    min-height: 400px;
}

.detective-step-content {
    animation: fadeIn 0.3s ease-out;
}

/* Observation Checklist */
.observation-checklist {
    background: var(--bg-secondary);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-2);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checklist-item:hover {
    background: var(--detective-primary);
    color: var(--text-inverse);
}

.checklist-item input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--detective-primary);
}

/* Bird Comparison Grid */
.bird-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.bird-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bird-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(44, 85, 48, 0.25);
    border-color: var(--detective-accent);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255, 179, 71, 0.05) 100%);
}

.bird-card:active {
    transform: translateY(-2px) scale(0.98);
}

.bird-card.selected {
    border-color: var(--detective-primary);
    background: linear-gradient(135deg, var(--color-success-bg) 0%, rgba(76, 175, 80, 0.1) 100%);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    animation: pulseSelected 2s ease-in-out infinite;
}

@keyframes pulseSelected {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1), 0 4px 12px rgba(44, 85, 48, 0.15);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.2), 0 6px 16px rgba(44, 85, 48, 0.25);
    }
}

.bird-image-container {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--border-light);
    padding: var(--space-2);
}

.bird-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.bird-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.bird-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.5;
    flex-grow: 1;
}

.play-bird-btn {
    width: 100%;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

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

.play-bird-btn:active::before {
    width: 300px;
    height: 300px;
}

.play-icon {
    display: inline-block;
    margin-right: 4px;
    transition: transform 0.3s ease;
}

.play-bird-btn:hover .play-icon {
    transform: scale(1.2);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison-table thead {
    background: var(--detective-primary);
    color: var(--text-inverse);
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-3);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table tbody tr:hover {
    background: var(--bg-secondary);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Bird Info Grid */
.bird-info-grid {
    display: grid;
    gap: var(--space-3);
}

.info-item {
    padding: var(--space-2);
}

.info-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-size: var(--text-base);
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Rewards Grid */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.reward-item {
    text-align: center;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.reward-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.reward-value {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: var(--space-2) !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.2 !important;
}

.reward-label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    opacity: 1 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

/* Field Report */
.field-report {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
}

.report-header {
    border-bottom: 2px solid var(--detective-primary);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
}

.report-header h3 {
    color: var(--detective-primary);
    margin-bottom: var(--space-1);
}

.report-date {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.report-section {
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.report-section h4 {
    color: var(--detective-primary);
    margin-bottom: var(--space-2);
    font-size: var(--text-lg);
}

.report-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.report-section p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .challenge-stats {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .stat-item {
        min-width: 100%;
    }
    
    .bird-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: var(--text-sm);
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: var(--space-2);
    }
    
    .detective-step-indicator {
        overflow-x: auto;
        padding-bottom: var(--space-2);
    }
}

/* Print Styles for Reports */
@media print {
    .detective-btn {
        display: none;
    }
    
    .field-report {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .report-section {
        page-break-inside: avoid;
    }
}

