/* 고급 대시보드 스타일 - 최상위 UX/UI 디자인 */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #3a7bd5, #00d2ff);
    --secondary-gradient: linear-gradient(135deg, #8e2de2, #4a00e0);
    --accent-color: #3a7bd5;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --border-radius: 12px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.max-w-7xl {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 헤더 스타일 */
h1 {
    font-family: 'Montserrat', 'Pretendard', sans-serif;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.sub-heading {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* 차트 섹션 스타일 */
.chart-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: relative;
}

.chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-gradient);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.section-title {
    font-family: 'Montserrat', 'Pretendard', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    transition: var(--transition-normal);
}

.section-title:hover::after {
    width: 100%;
}

.chart-container {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    transition: var(--transition-normal);
}

.chart-container:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    transition: var(--transition-fast);
}

.chart-title:hover {
    color: var(--accent-color);
}

/* 컨트롤 패널 스타일 */
.section-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.select-box {
    background-color: var(--bg-secondary);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a5568' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.select-box:hover, .select-box:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.1);
    outline: none;
}

/* 통계 유형 선택 스타일 */
#stats-type-select {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 500;
    color: var(--accent-color);
}

#stats-type-select:hover {
    background: rgba(58, 123, 213, 0.1);
}

/* 그리드 레이아웃 */
.grid {
    display: grid;
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* 애니메이션 효과 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chart-section {
    animation: fadeIn 0.6s ease-out forwards;
}

.chart-section:nth-child(2) {
    animation-delay: 0.2s;
}

.chart-section:nth-child(3) {
    animation-delay: 0.4s;
}

/* 툴팁 스타일 */
.highcharts-tooltip {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* 반응형 레이아웃 */
@media (max-width: 768px) {
    .max-w-7xl {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .select-box {
        flex-grow: 1;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* 버튼 활성화/비활성화 스타일 */
.btn-active {
    background-color: #3182ce !important;
    color: white !important;
}

.btn-inactive {
    background-color: #e2e8f0 !important;
    color: #4a5568 !important;
}

/* 차트 컨테이너에 애니메이션 효과 */
.chart-container {
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* 선택 박스 애니메이션 */
.select-box {
    transition: all 0.2s ease;
}

/* 섹션 제목 애니메이션 */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3182ce;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 100%;
}

/* 로딩 애니메이션 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #3182ce;
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

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