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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 'aliceblue';
    line-height: 1;
    color: 'aliceblue';
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: aliceblue;
    overflow: hidden;
}

/* Header */
header {
    color: black;
    padding: 5px 5px;
    text-align: center;
}

header h1 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 12px;
    opacity: 0.95;
    font-weight: 400;
}

/* Chart container */
.chart-container {
    padding: 5px;
    background: white;
}

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

/* Controls section */
.controls {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.control-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
}

.radio-option:hover {
    color: #667eea;
}

.radio-option input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.radio-option span {
    user-select: none;
}

/* Analysis section */
.analysis {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.analysis h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

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

.insight-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #667eea;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

.insight-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

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

/* Note section */
.note {
    padding: 25px 40px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    border-bottom: 1px solid #ffc107;
}

.note p {
    font-size: 14px;
    color: #856404;
    margin: 0;
    line-height: 1.7;
}

.note strong {
    font-weight: 700;
}

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

    header {
        padding: 5px 5px;
    }

    header h1 {
        font-size: 16px;
    }

    .subtitle {
        font-size: 12px;
    }

    .chart-container {
        padding: 20px;
    }

    .analysis {
        padding: 25px 20px;
    }

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

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

    .insight-card {
        padding: 20px;
    }

    .note {
        padding: 20px 25px;
    }

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

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

    .subtitle {
        font-size: 13px;
    }

    .chart-container {
        padding: 15px;
    }

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

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

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

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

    header {
        background: #667eea;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

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

    .note {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease;
}

/* Accessibility */
:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.6s ease-out;
}
