:root {
    --chart-size: 400px;
}

#myChart,
#myChart1, #myChart3 {
max-width: var(--chart-size);
max-height: var(--chart-size);
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header-left p {
    color: #64748b;
    font-size: 1rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.time-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
}

.btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem;
    max-width: 100%;
}

.card-des {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.card-in {
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
}

.content-des {
    color: #64748b;
    font-size: 1rem;
    text-align: center;
}

.line {
    background: rgba(0, 0, 0, 0.2);
    width: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {

    .content-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-in {
        flex-direction: column;
        flex-wrap: wrap;
    } 

    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs-header {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #e2e8f0;
    }

    .tab-btn.active {
        border-bottom: 2px solid #ef4444;
    }

    .category-grid,
    .country-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

    .category-info,
    .country-info {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .category-stats,
    .country-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .card-in {
        flex-direction: column;
    } 
    
    .line {
        width: 100%;     /* 전체 너비 */
        height: 1px;      /* 높이로 줄 */
    }
}
