.stats-section {
    background: linear-gradient(135deg, var(--wfs-dark) 0%, #0f0f0f 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--wfs-yellow), transparent);
}

.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 60px 0;
}

@media (max-width: 1200px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid-5 {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(229, 199, 56, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(229, 199, 56, 0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(229, 199, 56, 0.06);
    border-color: var(--wfs-yellow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--wfs-yellow);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.stat-number.updating {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(229, 199, 56, 0.5);
}

/* Pulserande effekt för live-värden */
#stat-total-attacks,
#stat-attacks-24h {
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(229, 199, 56, 0.2);
    }
    50% {
        opacity: 0.85;
        text-shadow: 0 0 15px rgba(229, 199, 56, 0.4);
    }
}

.stat-number .unit {
    font-size: 1.5rem;
    color: var(--wfs-light-gray);
}

.stat-label {
    color: var(--wfs-light-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-trend {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-trend.up {
    background: rgba(0, 204, 136, 0.1);
    color: var(--wfs-success);
}

.stat-trend.stable {
    background: rgba(229, 199, 56, 0.1);
    color: var(--wfs-yellow);
}

.live-map-cta {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: linear-gradient(135deg, rgba(229, 199, 56, 0.05) 0%, rgba(229, 199, 56, 0.02) 100%);
    border-radius: 20px;
    border: 1px solid rgba(229, 199, 56, 0.1);
}

.live-map-cta h3 {
    color: var(--wfs-white);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.live-map-cta p {
    color: var(--wfs-light-gray);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.live-map-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

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

/* Attack Patterns Widget */
.attack-patterns-widget {
    margin-top: 60px;
    padding: 40px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(229, 199, 56, 0.1);
}

.attack-patterns-widget h3 {
    color: var(--wfs-white);
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
}

.patterns-container {
    min-height: 200px;
}

.loading-spinner {
    text-align: center;
    color: var(--wfs-yellow);
    padding: 40px;
    font-size: 16px;
}

.patterns-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.threat-type {
    position: relative;
}

.threat-bar {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(90deg, rgba(229, 199, 56, 0.2) 0%, rgba(229, 199, 56, 0.05) var(--width), transparent var(--width));
    border-radius: 5px;
    transition: all 0.3s;
    position: relative;
    border-left: 3px solid var(--wfs-yellow);
}

.threat-bar.rank-1 { border-left-color: #ff5252; }
.threat-bar.rank-2 { border-left-color: #ff9800; }
.threat-bar.rank-3 { border-left-color: #ffc107; }
.threat-bar.rank-4 { border-left-color: #4caf50; }
.threat-bar.rank-5 { border-left-color: #2196f3; }

.threat-bar:hover {
    background: linear-gradient(90deg, rgba(229, 199, 56, 0.3) 0%, rgba(229, 199, 56, 0.1) var(--width), transparent var(--width));
    transform: translateX(5px);
}

.threat-rank {
    background: rgba(229, 199, 56, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    color: var(--wfs-yellow);
    font-size: 12px;
}

.threat-name {
    color: var(--wfs-white);
    font-weight: 500;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.threat-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.threat-count {
    color: var(--wfs-yellow);
    font-weight: 700;
    font-size: 1.1rem;
}

.threat-percentage {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    background: rgba(229, 199, 56, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.widget-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(229, 199, 56, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 5px;
}

#patterns-timestamp {
    color: var(--wfs-yellow);
    font-weight: 500;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .attack-patterns-widget {
        padding: 25px 15px;
        margin: 40px -15px 0 -15px;
        border-radius: 0;
    }
    
    .threat-bar {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .threat-name {
        font-size: 0.85rem;
        min-width: 0;
    }
    
    .threat-stats {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .threat-count {
        font-size: 0.95rem;
    }
    
    .threat-percentage {
        font-size: 0.8rem;
    }
    
    .widget-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Respektera reduced motion för tillgänglighet */
@media (prefers-reduced-motion: reduce) {
    .patterns-list { 
        animation: none !important; 
    }
    .threat-bar:hover { 
        transform: none !important; 
    }
    .live-indicator { 
        animation: none !important;
        opacity: 1 !important;
    }
    .stat-number.updating {
        transform: none !important;
        animation: none !important;
    }
    #stat-total-attacks,
    #stat-attacks-24h {
        animation: none !important;
    }
}
