/* ========================================
   BIAS Analytics Page Styles
   Premium fonts: Space Grotesk + Inter
   Sci-fi/Gaming/Gambling Aesthetic
======================================== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.analytics-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 15px;
    animation: pulseGold 2s ease-in-out infinite;
}

@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    color: var(--electric-blue);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--electric-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

.action-btn i {
    font-size: 16px;
}

.action-btn#refreshBtn:hover i {
    animation: spin 0.6s ease;
}

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

/* AI Suggestions Section */
.ai-suggestions-section {
    margin-bottom: 40px;
}

.ai-suggestion-card {
    background: var(--card-bg);
    border: 2px solid;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    animation: slideInRight 0.5s ease;
    position: relative;
    overflow: hidden;
}

.ai-suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.ai-suggestion-card.improvement {
    border-color: rgba(66, 153, 225, 0.5);
    background: rgba(66, 153, 225, 0.05);
}

.ai-suggestion-card.warning {
    border-color: rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.05);
}

.ai-suggestion-card.success {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.05);
}

.ai-suggestion-card.danger {
    border-color: rgba(255, 51, 102, 0.5);
    background: rgba(255, 51, 102, 0.05);
}

.suggestion-icon {
    font-size: 48px;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
}

.ai-suggestion-card.improvement .suggestion-icon {
    color: #4299e1;
}

.ai-suggestion-card.warning .suggestion-icon {
    color: #ffc107;
}

.ai-suggestion-card.success .suggestion-icon {
    color: #00ff88;
}

.ai-suggestion-card.danger .suggestion-icon {
    color: #ff3366;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.suggestion-text {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.suggestion-list {
    list-style: none;
    margin: 15px 0;
    padding: 0;
}

.suggestion-list li {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.suggestion-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--electric-blue);
    font-weight: bold;
}

.suggestion-quote {
    font-family: var(--font-display);
    font-size: 14px;
    font-style: italic;
    color: var(--gold);
    margin: 15px 0;
    padding-left: 20px;
    border-left: 3px solid var(--gold);
}

.suggestion-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.suggestion-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.suggestion-btn.primary {
    background: linear-gradient(135deg, var(--electric-blue), var(--neon-purple));
    color: white;
}

.suggestion-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}

.suggestion-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.suggestion-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--gold), #ffa500);
    border-radius: 20px;
    color: var(--deep-navy);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
}

.suggestion-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.suggestion-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(10, 10, 20, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(66, 153, 225, 0.3);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    flex-shrink: 0;
}

.metric-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, var(--icon-color-1), var(--icon-color-2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.8;
}

.metric-icon.win {
    --icon-color-1: #ffd700;
    --icon-color-2: #ff8c00;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.metric-icon.profit {
    --icon-color-1: #00ff88;
    --icon-color-2: #00cc6a;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.metric-icon.avg {
    --icon-color-1: #4299e1;
    --icon-color-2: #667eea;
    color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
}

.metric-icon.sharpe {
    --icon-color-1: #ed64a6;
    --icon-color-2: #9f7aea;
    color: #ed64a6;
    background: rgba(237, 100, 166, 0.1);
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.metric-change {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-change.positive {
    color: #00ff88;
}

.metric-change.negative {
    color: #ff4757;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.chart-card {
    background: rgba(10, 10, 20, 0.7);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(66, 153, 225, 0.2);
}

.chart-header h3 {
    font-family: 'Space Grotesk', monospace;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3 i {
    color: #4299e1;
}

.chart-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 8px 16px;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    background: rgba(66, 153, 225, 0.2);
    color: #ffffff;
    border-color: rgba(66, 153, 225, 0.5);
}

.chart-btn.active {
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.chart-body {
    position: relative;
}

/* Insights Section */
.insights-section {
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Space Grotesk', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: #4299e1;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.insight-card {
    background: rgba(10, 10, 20, 0.7);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(66, 153, 225, 0.2);
}

.insight-icon {
    font-size: 24px;
    color: #4299e1;
}

.insight-header h3 {
    font-family: 'Space Grotesk', monospace;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.insight-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(66, 153, 225, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4299e1;
}

.insight-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.insight-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.insight-value.negative {
    color: #ff4757;
}

/* Emotion Bars */
.emotion-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emotion-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 100px;
}

.emotion-progress {
    flex: 1;
    height: 8px;
    background: rgba(66, 153, 225, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.emotion-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #667eea);
    border-radius: 4px;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.emotion-fill::after {
    content: '';
    position: absolute;
    inset: 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%); }
}

.emotion-score {
    font-family: 'Space Grotesk', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #4299e1;
    min-width: 45px;
    text-align: right;
}

/* ORB Insights */
.orb-insight {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(66, 153, 225, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.orb-insight i {
    color: #667eea;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.orb-insight p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Advanced Metrics */
.advanced-metrics {
    margin-bottom: 40px;
}

.metrics-table-card {
    background: rgba(10, 10, 20, 0.7);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    overflow-x: auto;
}

.metrics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.metrics-table thead tr {
    background: rgba(66, 153, 225, 0.1);
}

.metrics-table th {
    font-family: 'Space Grotesk', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #4299e1;
    text-align: left;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metrics-table th:first-child {
    border-radius: 8px 0 0 0;
}

.metrics-table th:last-child {
    border-radius: 0 8px 0 0;
}

.metrics-table tbody tr {
    transition: background 0.3s ease;
}

.metrics-table tbody tr:hover {
    background: rgba(66, 153, 225, 0.05);
}

.metrics-table td {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    padding: 16px;
    border-bottom: 1px solid rgba(66, 153, 225, 0.1);
}

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

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.good {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge.warning {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.status-badge.neutral {
    background: rgba(66, 153, 225, 0.2);
    color: #4299e1;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

/* Timeframe Select */
.timeframe-select {
    padding: 10px 16px;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeframe-select:hover {
    border-color: rgba(66, 153, 225, 0.6);
    background: rgba(10, 10, 20, 0.9);
}

.timeframe-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* Responsive */
@media (max-width: 968px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .charts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .chart-controls {
        width: 100%;
        justify-content: space-between;
    }

    .chart-btn {
        flex: 1;
        padding: 6px 8px;
        font-size: 11px;
    }

    .main-content {
        padding-bottom: 80px;
    }

    .metrics-table-card {
        padding: 16px;
    }

    .metrics-table {
        font-size: 12px;
    }

    .metrics-table th,
    .metrics-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 640px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 20px;
    }

    .metric-value {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .emotion-label {
        min-width: 80px;
        font-size: 12px;
    }
}
