/* arXivite Documentation Styles */
/* Unified CSS for all documentation pages */

/* Base styles */
html { 
    scroll-behavior: smooth; 
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d3748;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Common card hover effects */
.card-hover,
.decision-card,
.feature-card,
.insight-card,
.metric-card,
.commit-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover,
.decision-card:hover,
.feature-card:hover,
.insight-card:hover,
.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.commit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Tech stack and lesson items */
.tech-stack-item,
.lesson-item {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

/* Code blocks */
.code-block {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #e2e8f0;
}

/* Timeline specific styles - centered timeline line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #10b981, #f59e0b);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid #1f2937;
    background: white;
    z-index: 10;
}

.timeline-content {
    width: 100%;
    padding: 2rem;
    background: rgba(31, 41, 55, 0.5);
    color: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.timeline-left .timeline-content {
    width: 100%;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.timeline-left {
    width: 45%;
    margin-left: 0;
}

.timeline-left .timeline-content::before {
    right: -30px;
    border-left-color: rgba(31, 41, 55, 0.5);
    border-right-color: transparent;
}

.timeline-right {
    margin-left: 52%;
    width: 48%;
}



.timeline-right .timeline-content::before {
    left: -30px;
    border-right-color: rgba(31, 41, 55, 0.5);
    border-left-color: transparent;
}

/* Timeline responsive styles */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }
    .timeline-dot {
        left: 30px;
    }
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 60px;
    }
    .timeline-right {
        margin-left: 60px;
    }
    .timeline-content::before {
        left: -30px !important;
        right: auto !important;
        border-right-color: rgba(31, 41, 55, 0.5) !important;
        border-left-color: transparent !important;
    }
}

/* Search and form inputs */
.search-input {
    background: #374151;
    border: 1px solid #4b5563;
    color: #f9fafb;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Legacy timeline styles disabled */
.timeline-item::before {
    display: none;
}

/* Chart container heights */
.chart-container {
    height: 256px;
    width: 100%;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

/* Chart background overrides for better visibility */
.metric-card,
.bg-gray-800\/50 {
    background: rgba(55, 65, 81, 0.8) !important;
}

/* Specific chart card styling */
.chart-card {
    background: rgba(55, 65, 81, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
}

/* Chart canvas specific styling */
.chart-container canvas {
    background: rgba(75, 85, 99, 0.2) !important;
    border-radius: 6px;
}

/* Utility classes for consistency */
.gradient-bg {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.card-bg {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.card-bg-solid {
    background: #1f2937;
    border: 1px solid #374151;
}

/* Status badges and tags */
.era-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.era-1 { background-color: #3b82f6; }
.era-2 { background-color: #8b5cf6; }
.era-3 { background-color: #10b981; }
.era-4 { background-color: #f59e0b; }

.domain-search { background-color: #3b82f6; }
.domain-ui { background-color: #10b981; }
.domain-data { background-color: #8b5cf6; }
.domain-performance { background-color: #ef4444; }
.domain-auth { background-color: #f59e0b; }

/* Navigation active states */
.nav-active {
    color: #60a5fa !important;
    font-weight: 600;
}

/* Common text colors for consistency */
.text-primary { color: #3b82f6; }
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.text-purple { color: #8b5cf6; }
.text-cyan { color: #06b6d4; }

/* Common background colors with opacity */
.bg-primary-10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-success-10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-warning-10 { background-color: rgba(245, 158, 11, 0.1); }
.bg-danger-10 { background-color: rgba(239, 68, 68, 0.1); }
.bg-purple-10 { background-color: rgba(139, 92, 246, 0.1); }

/* Border colors with opacity */
.border-primary-30 { border-color: rgba(59, 130, 246, 0.3); }
.border-success-30 { border-color: rgba(16, 185, 129, 0.3); }
.border-warning-30 { border-color: rgba(245, 158, 11, 0.3); }
.border-danger-30 { border-color: rgba(239, 68, 68, 0.3); }
.border-purple-30 { border-color: rgba(139, 92, 246, 0.3); }

/* Chart color variables for JavaScript */
:root {
    --chart-blue: #3b82f6;
    --chart-purple: #8b5cf6;
    --chart-green: #10b981;
    --chart-orange: #f59e0b;
    --chart-red: #ef4444;
    --chart-cyan: #06b6d4;
    --chart-gray: #6b7280;
    --chart-background: rgba(55, 65, 81, 0.8);
    --chart-border: #4b5563;
    --chart-text: #d1d5db;
    --chart-grid: rgba(107, 114, 128, 0.3);
}

/* Print styles */
@media print {
    .timeline-content:hover,
    .card-hover:hover,
    .decision-card:hover,
    .feature-card:hover,
    .insight-card:hover,
    .metric-card:hover,
    .commit-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    nav {
        display: none;
    }
    
    .timeline-line {
        background: #000 !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .timeline-content,
    .card-bg,
    .card-bg-solid {
        border-width: 2px;
    }
    
    .timeline-line {
        width: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .card-hover,
    .decision-card,
    .feature-card,
    .insight-card,
    .metric-card,
    .commit-card,
    .timeline-content {
        transition: none;
    }
    
    .card-hover:hover,
    .decision-card:hover,
    .feature-card:hover,
    .insight-card:hover,
    .metric-card:hover,
    .commit-card:hover,
    .timeline-content:hover {
        transform: none;
    }
}