/* =====================================================
   CORRELATION ANALYSIS PAGE - ENHANCED STYLES
   Version: 1.0
   Description: Modern styling for Correlation Analysis Dashboard
   ===================================================== */

/* ===================================================== 
   1. HERO SECTION
   ===================================================== */
.correlation-hero {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 25%, #f87171 50%, #fca5a5 100%);
    padding: 5rem 0 6rem;
    margin: -1.5rem -15px 3rem;
    position: relative;
    overflow: hidden;
}

.correlation-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle at 80% 50%, rgb(254 202 202 / 30%) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgb(252 165 165 / 30%) 0%, transparent 50%);
    animation: float-slow 30s ease-in-out infinite;
}

.correlation-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: #f8fafc;
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0% 100%);
}

.correlation-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.correlation-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgb(255 255 255 / 20%);
    backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 30%);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: white;
    font-weight: 600;
}

.correlation-hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.correlation-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgb(0 0 0 / 10%);
    animation: slideInUp 0.8s ease-out;
}

.correlation-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

/* ===================================================== 
   2. KEY METRICS CARDS
   ===================================================== */
.correlation-metrics-container {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}

.correlation-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.correlation-metric-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 15px 40px rgb(0 0 0 / 10%);
    border: 1px solid rgb(0 0 0 / 5%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.correlation-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentcolor, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.correlation-metric-card:hover::before {
    transform: translateX(100%);
}

.correlation-metric-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgb(0 0 0 / 15%);
}

.correlation-metric-card.danger {
    --metric-color: #dc2626;
    color: var(--metric-color);
}

.correlation-metric-card.warning {
    --metric-color: #f59e0b;
    color: var(--metric-color);
}

.correlation-metric-card.info {
    --metric-color: #3b82f6;
    color: var(--metric-color);
}

.correlation-metric-card.success {
    --metric-color: #10b981;
    color: var(--metric-color);
}

.correlation-metric-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--metric-color), color-mix(in srgb, var(--metric-color), white 30%));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 25px color-mix(in srgb, var(--metric-color), transparent 60%);
    position: relative;
    overflow: hidden;
}

.correlation-metric-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgb(255 255 255 / 40%) 50%, transparent 70%);
    animation: shine 3s infinite;
}

.correlation-metric-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.correlation-metric-value {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--metric-color), color-mix(in srgb, var(--metric-color), black 20%));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.correlation-metric-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* ===================================================== 
   3. ANALYSIS TABS
   ===================================================== */
.correlation-tabs-container {
    margin: 3rem 0 2rem;
    background: white;
    border-radius: 20px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgb(0 0 0 / 8%);
}

.correlation-tabs {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.correlation-tabs .nav-item {
    flex: 1;
}

.correlation-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.correlation-tabs .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.correlation-tabs .nav-link:hover {
    color: #dc2626;
    background: rgb(220 38 38 / 5%);
}

.correlation-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 8px 20px rgb(220 38 38 / 30%);
}

.correlation-tabs .nav-link.active::before {
    opacity: 1;
}

.correlation-tabs .nav-link i {
    font-size: 1.125rem;
}

.correlation-tabs .nav-link span {
    position: relative;
    z-index: 1;
}

/* ===================================================== 
   4. CHART CARDS
   ===================================================== */
.correlation-chart-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgb(0 0 0 / 8%);
    overflow: hidden;
    border: 1px solid rgb(0 0 0 / 5%);
    transition: all 0.3s ease;
    height: 100%;
}

.correlation-chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgb(0 0 0 / 12%);
}

.correlation-chart-header {
    background: linear-gradient(to bottom, rgb(249 250 251 / 80%), transparent);
    padding: 1.75rem;
    border-bottom: 1px solid rgb(0 0 0 / 5%);
}

.correlation-chart-header.primary { background: linear-gradient(135deg, #dc2626, #ef4444); }
.correlation-chart-header.info { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.correlation-chart-header.warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.correlation-chart-header.success { background: linear-gradient(135deg, #10b981, #34d399); }
.correlation-chart-header.danger { background: linear-gradient(135deg, #dc2626, #ef4444); }
.correlation-chart-header.secondary { background: linear-gradient(135deg, #64748b, #94a3b8); }

.correlation-chart-header.primary h5,
.correlation-chart-header.info h5,
.correlation-chart-header.warning h5,
.correlation-chart-header.success h5,
.correlation-chart-header.danger h5,
.correlation-chart-header.secondary h5 {
    color: white;
    text-shadow: 0 2px 4px rgb(0 0 0 / 10%);
}

.correlation-chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.correlation-chart-body {
    padding: 2rem;
    background: rgb(248 250 252 / 50%);
}

.correlation-chart-container {
    position: relative;
    height: 350px;
}

/* ===================================================== 
   5. CORRELATION MATRIX
   ===================================================== */
.correlation-matrix {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.correlation-matrix table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.correlation-matrix th,
.correlation-matrix td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.correlation-matrix th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: 600;
    color: #475569;
}

.correlation-matrix td {
    background: white;
    transition: all 0.2s ease;
}

.correlation-matrix td:hover {
    background: #fef2f2;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
    position: relative;
    z-index: 10;
}

.correlation-value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.correlation-value.strong {
    color: #dc2626;
}

.correlation-value.moderate {
    color: #f59e0b;
}

.correlation-value.weak {
    color: #64748b;
}

/* ===================================================== 
   6. FACTOR COMBINATIONS
   ===================================================== */
.factor-combination-list {
    max-height: 500px;
    overflow-y: auto;
}

.factor-combination-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 12px;
    border: 1px solid #fecaca;
    transition: all 0.3s ease;
}

.factor-combination-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgb(220 38 38 / 15%);
    cursor: pointer;
}

.factor-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-right: 1rem;
    flex-shrink: 0;
}

.factor-details {
    flex: 1;
}

.factor-name {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.factor-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.factor-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===================================================== 
   7. WEAPON ANALYSIS
   ===================================================== */
.weapon-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.weapon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgb(0 0 0 / 10%);
    border-color: #dc2626;
}

.weapon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.weapon-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1e293b;
}

.weapon-usage {
    font-size: 0.875rem;
    color: #64748b;
}

.lethality-meter {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.lethality-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #f59e0b, #dc2626);
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===================================================== 
   8. INSIGHTS PANEL
   ===================================================== */
.correlation-insights-panel {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #fecaca;
}

.correlation-insights-panel h4 {
    color: #dc2626;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-item {
    display: flex;
    align-items: start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.insight-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgb(0 0 0 / 8%);
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.insight-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.insight-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.insight-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.insight-content {
    flex: 1;
}

.insight-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.insight-text {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

/* ===================================================== 
   9. LOADING STATES
   ===================================================== */
.correlation-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.correlation-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

/* ===================================================== 
   10. ANIMATIONS
   ===================================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================================== 
   11. RESPONSIVE DESIGN
   ===================================================== */
@media (width <= 1200px) {
    .correlation-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width <= 768px) {
    .correlation-hero {
        padding: 3rem 0 4rem;
    }
    
    .correlation-hero-title {
        font-size: 2.5rem;
    }
    
    .correlation-hero-subtitle {
        font-size: 1.125rem;
    }
    
    .correlation-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .correlation-metric-card {
        padding: 1.5rem;
    }
    
    .correlation-metric-value {
        font-size: 2.25rem;
    }
    
    .correlation-tabs {
        flex-direction: column;
    }
    
    .correlation-tabs .nav-link {
        justify-content: flex-start;
    }
    
    .correlation-chart-container {
        height: 250px;
    }
}

@media (width <= 480px) {
    .correlation-hero-title {
        font-size: 2rem;
    }
    
    .correlation-metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .correlation-metric-value {
        font-size: 1.75rem;
    }
}

/* ===================================================== 
   12. DARK MODE SUPPORT
   ===================================================== */












/* ===================================================== 
   8. WEAPON INSIGHTS
   ===================================================== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.insight-card {
    border-radius: 12px;
    border: none;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.insight-card h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-card p {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ===================================================== 
   9. WEAPON DESCRIPTIONS
   ===================================================== */
.weapon-descriptions-grid {
    display: grid;
    gap: 0.75rem;
}

.weapon-description-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.weapon-description-item:hover {
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgb(220 38 38 / 10%);
    transform: translateX(4px);
}

.weapon-desc-name {
    color: #1e293b;
    font-size: 0.95rem;
}

.weapon-desc-progress {
    margin-top: 0.5rem;
}

.translation-guide {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}
