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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.status {
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 4px;
    margin-top: 10px;
    display: inline-block;
    font-weight: 500;
}

.status.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status.warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .chart-section {
        padding: 16px;
    }

    .chart-container {
        height: 300px;
    }

    .status {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .chart-section h2 {
        font-size: 1.25rem;
    }

    .chart-container {
        height: 250px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1565c0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Chart styling overrides */
.chart-container canvas {
    background-color: transparent !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .loading {
        animation: none;
    }
}

/* Table styles */
.table-container {
    width: 100%;
    overflow-x: auto;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#dataTable thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

#dataTable th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

#dataTable th:nth-child(1) {
    width: 80px;
}

#dataTable th:nth-child(2) {
    width: 200px;
}

#dataTable td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
}

#dataTable tbody tr:hover {
    opacity: 0.8;
}

#dataTable tbody tr.positive {
    background-color: #ffebee;
}

#dataTable tbody tr.negative {
    background-color: #e8f5e9;
}

#dataTable tbody tr.neutral {
    background-color: #f5f5f5;
}

#dataTable td:nth-child(1) {
    font-weight: 500;
    color: #1565c0;
    cursor: pointer;
}

#dataTable td:nth-child(1):hover {
    text-decoration: underline;
}

#dataTable td:nth-child(2) {
    font-family: 'Courier New', monospace;
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }

    .chart-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}