/* Enhanced Forensic Analysis Visualization Styles */

/* Timeline Chart Styles */
.forensic-timeline-chart {
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.forensic-timeline-chart .axis-label {
    fill: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.forensic-timeline-chart .x-axis,
.forensic-timeline-chart .y-axis {
    color: #888;
}

.forensic-timeline-chart .x-axis text,
.forensic-timeline-chart .y-axis text {
    fill: #ccc;
    font-size: 12px;
}

.forensic-timeline-chart .x-axis path,
.forensic-timeline-chart .y-axis path,
.forensic-timeline-chart .x-axis line,
.forensic-timeline-chart .y-axis line {
    stroke: #555;
}

/* Line styles for different analysis techniques */
.line-compression {
    stroke: #ff6b6b !important;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 3px rgba(255, 107, 107, 0.3));
}

.line-optical_flow {
    stroke: #4ecdc4 !important;
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px rgba(78, 205, 196, 0.3));
}

.line-histogram {
    stroke: #45b7d1 !important;
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px rgba(69, 183, 209, 0.3));
}

.line-noise {
    stroke: #96ceb4 !important;
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px rgba(150, 206, 180, 0.3));
}

.line-anomaly_scores {
    stroke: #feca57 !important;
    stroke-width: 3px;
    filter: drop-shadow(0 0 4px rgba(254, 202, 87, 0.4));
}

/* Data point styles */
.point {
    cursor: pointer;
    transition: all 0.2s ease;
}

.point:hover {
    r: 5;
    filter: drop-shadow(0 0 6px currentColor);
}

/* Anomaly markers */
.anomaly-marker {
    stroke: #ff4757;
    stroke-width: 3px;
    stroke-dasharray: 5,5;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

.anomaly-label {
    fill: #ff4757;
    font-size: 11px;
    font-weight: bold;
    text-anchor: middle;
    filter: drop-shadow(0 0 2px rgba(255, 71, 87, 0.5));
}

@keyframes pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.6; }
}

/* Legend styles */
.legend {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    padding: 10px;
}

.legend-item text {
    fill: #e0e0e0;
    font-size: 12px;
}

/* Tooltip styles */
.forensic-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    color: #e0e0e0;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.tooltip-header {
    font-weight: bold;
    color: #feca57;
    margin-bottom: 5px;
    border-bottom: 1px solid #555;
    padding-bottom: 3px;
}

.tooltip-content div {
    margin: 2px 0;
}

/* Brush selection */
.brush .selection {
    fill: rgba(254, 202, 87, 0.2);
    stroke: #feca57;
    stroke-width: 1px;
}

/* Time highlight */
.time-highlight {
    pointer-events: none;
}

/* Enhanced Dashboard Layout */
.analysis-dashboard {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin: 20px 0;
}

.main-chart-container {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.analysis-sidebar {
    background: #222;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Evidence Cards */
.evidence-card {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #ff6b6b;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.evidence-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.evidence-card.high-confidence {
    border-left-color: #ff4757;
    background: linear-gradient(135deg, #3d1a1a 0%, #2a1515 100%);
}

.evidence-card.medium-confidence {
    border-left-color: #ffa502;
    background: linear-gradient(135deg, #3d2f1a 0%, #2a2015 100%);
}

.evidence-card.low-confidence {
    border-left-color: #2ed573;
    background: linear-gradient(135deg, #1a3d25 0%, #152a1a 100%);
}

.evidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.evidence-title {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 14px;
}

.confidence-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.confidence-badge.high { background: #ff4757; }
.confidence-badge.medium { background: #ffa502; }
.confidence-badge.low { background: #2ed573; }

.evidence-details {
    font-size: 12px;
    color: #ccc;
    line-height: 1.4;
}

/* Analysis Controls */
.analysis-controls {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.control-group {
    margin: 10px 0;
}

.control-label {
    display: block;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 5px;
}

.control-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 8px;
    color: #e0e0e0;
    font-size: 12px;
}

.control-button {
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 5px 5px 5px 0;
}

.control-button:hover {
    background: #45b7d1;
}

.control-button.secondary {
    background: #666;
}

.control-button.secondary:hover {
    background: #777;
}

/* Statistics Panel */
.stats-panel {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 6px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #feca57;
    display: block;
}

.stat-label {
    font-size: 11px;
    color: #ccc;
    margin-top: 2px;
}

/* Multi-view Layout */
.multi-view-container {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
    height: 100vh;
}

.view-tabs {
    display: flex;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 5px;
}

.view-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #ccc;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-tab.active {
    background: #4ecdc4;
    color: white;
}

.view-tab:hover:not(.active) {
    background: #3a3a3a;
    color: #e0e0e0;
}

.view-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .analysis-dashboard {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .main-chart-container,
    .analysis-sidebar {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .view-tabs {
        flex-direction: column;
    }
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #555;
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #ccc;
    margin-left: 15px;
    font-size: 14px;
}

/* Export Controls */
.export-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.export-button {
    background: #96ceb4;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.export-button:hover {
    background: #7fb89a;
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Enhanced Command Block Styles */
.command-block {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    color: #e8e8e8;
    padding: 20px 24px;
    border-radius: 12px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    white-space: pre-wrap;
    word-break: break-word;
}

.command-block::before {
    content: "💻";
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 16px;
    opacity: 0.6;
}

.command-block .highlight {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

/* Evidence Card Enhancements */
.evidence-card {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    border-left: 4px solid #4ecdc4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.evidence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4ecdc4, #45b7d1, #96ceb4);
    opacity: 0.6;
}

.evidence-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-left-color: #45b7d1;
}

.evidence-card h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evidence-card p {
    color: #d0d0d0;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Expandable Command Sections */
.command-section {
    margin: 20px 0;
}

.command-summary {
    background: linear-gradient(135deg, #3a3a3a 0%, #2e2e2e 100%);
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #4a4a4a;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.command-summary:hover {
    background: linear-gradient(135deg, #404040 0%, #343434 100%);
    border-color: #4ecdc4;
}

.command-summary::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    color: #4ecdc4;
    font-size: 12px;
}

.command-summary.collapsed::after {
    transform: translateY(-50%) rotate(-90deg);
}

.command-summary h4 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.command-summary p {
    margin: 8px 0 0 0;
    color: #b0b0b0;
    font-size: 14px;
}

.command-details {
    margin-top: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.command-details.collapsed {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

.command-details.expanded {
    max-height: 500px;
    opacity: 1;
}

/* Copy Button for Commands */
.command-block-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: #4ecdc4;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.copy-button:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
    color: #ffffff;
}

.copy-button.copied {
    background: rgba(46, 213, 115, 0.2);
    border-color: #2ed573;
    color: #2ed573;
}

/* Methodology Section Improvements */
.methodology {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
    border: 1px solid #404040;
}

.methodology h3 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.step {
    background: rgba(78, 205, 196, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 3px solid #4ecdc4;
    transition: all 0.2s ease;
}

.step:hover {
    background: rgba(78, 205, 196, 0.08);
    transform: translateX(4px);
}

.step h4 {
    color: #4ecdc4;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.step p {
    color: #d0d0d0;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .command-block {
        padding: 16px 20px;
        font-size: 13px;
        margin: 16px 0;
    }
    
    .evidence-card {
        padding: 20px;
        margin: 20px 0;
    }
    
    .methodology {
        padding: 24px;
        margin: 24px 0;
    }
    
    .step {
        padding: 16px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
