/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chart-container {
    padding: 30px;
    background: white;
}

canvas {
    max-width: 100%;
    height: auto !important;
}

.controls {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.analysis {
    padding: 30px;
    background: white;
}

.analysis h2 {
    color: #2d3748;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

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

.insight-card {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-left-color: #764ba2;
}

.insight-card h3 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.insight-card p {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
}

.insight-card strong {
    color: #e53e3e;
    font-weight: 700;
}

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

    .container {
        border-radius: 8px;
    }

    .chart-container {
        padding: 20px 15px;
    }

    .controls {
        padding: 15px;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    .analysis {
        padding: 20px 15px;
    }

    .analysis h2 {
        font-size: 20px;
    }

    .insight-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .insight-card {
        padding: 15px;
    }

    .insight-card h3 {
        font-size: 16px;
    }

    .insight-card p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 15px 10px;
    }

    .analysis h2 {
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .controls {
        display: none;
    }

    .insight-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
