/**
 * BLACKBOX FORENSICS - DATA STORYTELLING STYLES
 * Interactive data visualization and infographic styles
 * Inspired by Apple keynotes and Tesla data displays
 */

/* ========================================
   DATA STORYTELLING SECTION
   ======================================== */

#data-storytelling {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

#data-storytelling::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.story-section {
    position: relative;
    z-index: 1;
}

/* ========================================
   STATISTICS & COUNTERS
   ======================================== */

.threat-stats .stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.threat-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    /* transform: translateX(10px); */
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   CHART CONTAINERS
   ======================================== */

.chart-container {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(59, 130, 246, 0.1) 50%, transparent 51%);
    pointer-events: none;
}

#threats-chart {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========================================
   IMPACT METRICS
   ======================================== */

.metric-card {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    /* transform: translateY(-3px) scale(1.01); */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.metric-circle {
    position: relative;
    display: inline-block;
}

.progress-ring {
    transform: rotate(-90deg);
    transition: all 0.3s ease;
}

.progress-circle {
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-value-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.metric-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
    display: block;
    line-height: 1;
}

.metric-unit {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ========================================
   INDUSTRY CHART
   ======================================== */

.industry-bar {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.industry-bar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    /* transform: translateX(5px); */
}

.progress-bar-container {
    margin: 0.5rem 0;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-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);
    animation: shimmer 2s infinite;
}

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

/* ========================================
   INDUSTRY HIGHLIGHT
   ======================================== */

.industry-highlight {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.industry-highlight:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ========================================
   PERSONALIZED CONTENT
   ======================================== */

.personalized-content {
    position: relative;
}

.personalized-content::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -20px;
    font-size: 0.75rem;
    animation: sparkle 2s infinite;
}

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

.personalized-recommendations {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    position: relative;
}

.personalized-recommendations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(16, 185, 129, 0.05) 50%, transparent 51%);
    pointer-events: none;
}

.recommendation-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    background: rgba(16, 185, 129, 0.1);
    /* transform: translateY(-2px); */
}

.personalized-trust {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
}

/* ========================================
   RETURNING VISITOR CONTENT
   ======================================== */

.welcome-back-banner {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: slide-down 0.5s ease-out;
}

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

.loyal-visitor-offer {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: fade-in-scale 0.6s ease-out;
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .metric-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        margin-bottom: 2rem;
    }
    
    .industry-bar {
        margin-bottom: 1rem;
    }
    
    #threats-chart {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 576px) {
    .stat-number {
        font-size: 1.75rem;
    }
    
    .metric-number {
        font-size: 1.25rem;
    }
    
    .story-section {
        margin-bottom: 3rem !important;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .progress-circle,
    .progress-bar-fill,
    .metric-card,
    .industry-bar {
        transition: none;
    }
    
    .shimmer,
    .sparkle,
    .pulse-glow {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .chart-container,
    .metric-card,
    .industry-bar {
        border-width: 2px;
        border-color: #ffffff;
    }
    
    .stat-number,
    .metric-number {
        color: #ffffff;
    }
}
