* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-placeholder .upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-placeholder p {
    margin-bottom: 20px;
    color: #666;
}

.btn-primary, .btn-secondary, .btn-success {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.file-info {
    margin-top: 20px;
}

.status-card {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.status-card.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-card.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-card.processing {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.results-actions {
    margin-bottom: 20px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chart-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* === ENHANCED CHARTS ADDITIONS === */
.chart-section {
    margin-bottom: 40px;
}

.chart-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.gallery-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-controls select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.preview-chart {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.preview-chart img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.chart-container {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.chart-container.featured-chart {
    grid-column: 1 / -1;
    text-align: center;
}

.chart-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.chart-description {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-controls select {
        min-width: auto;
    }
}

/* === APP PAGE NAVIGATION STYLES === */
.nav-link {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid #667eea;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
}

.nav-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.app-title {
    flex: 1;
    min-width: 300px;
}

.app-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        text-align: center;
    }
    
    .app-title {
        min-width: auto;
    }
}
/* === ENHANCED DEVELOPMENT DASHBOARD STYLES === */
.dashboard-section {
    margin-bottom: 40px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.metric-card {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(142, 68, 173, 0.3);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.analysis-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #8e44ad;
}

.indicators-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.chart-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.charts-container {
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.chart-category {
    margin-bottom: 30px;
}

.chart-category h4 {
    color: #8e44ad;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #8e44ad;
}

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

.enhanced-chart-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.enhanced-chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chart-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background: #5a6268;
}

.dev-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.dev-output {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    min-height: 100px;
}

.dev-output-item {
    margin-bottom: 15px;
}

.dev-output-item:last-child {
    margin-bottom: 0;
}

.analysis-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #8e44ad;
}

.focused-chart {
    text-align: center;
}

.analysis-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #8e44ad;
}

.fallback-dashboard {
    text-align: center;
    padding: 20px;
}

.basic-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }
    
    .category-charts {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-direction: column;
    }
}
