body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    height: 100vh;       /* body 전체 높이 */
    overflow: hidden;    /* body 스크롤 제거 */
}

/* 사이드바 */
.sidebar {
    width: 220px;
    background-color: #1e1e2f;
    color: white;
    height: 100vh;
    position: fixed;
    padding: 20px 20px 0 20px;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar h2 {
    font-size: 20px;
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    color: #bbb;
    text-decoration: none;
    margin: 10px 0;
    font-size: 15px;
}

.sidebar a:hover {
    color: #fff;
}

/* 햄버거 메뉴 버튼 (모바일에만 표시) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #1e1e2f;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
}

/* 본문 영역 */
.content {
    margin-left: 260px;
    padding: 30px 30px;
    width: calc(100% - 260px);
    height: 100%;              /* 100vh -> 100%로 변경 */
    overflow-y: auto;          /* 본문만 스크롤 */
    box-sizing: border-box;
    padding-bottom: 50px;     /* 스크롤 끝 영역 확보 */
}

.content h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* 검색폼 */
#searchForm {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

#searchForm input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

#searchForm input[type="text"]:focus {
    border-color: #4a90e2;
}

#searchForm button {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    background-color: #4a90e2;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#searchForm button:hover {
    background-color: #357ABD;
}

/* 검색 결과 영역 */
#resultContainer {
    margin-top: 20px;
}

#resultContainer h2 {
    margin-bottom: 15px;
}

/* 그리드 박스 */
.grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.box {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    min-width: 180px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.box h3 {
    margin-bottom: 10px;
}

/* 요약 상세 */
#summaryDetail {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* 에러 메시지 */
.error {
    color: red;
    font-weight: bold;
    margin-top: 20px;
}

/* Plotly 차트 영역 */
#chart {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;  /* 차트 하단 여백 */
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
    /* 햄버거 버튼 표시 */
    .menu-toggle {
        display: block;
    }

    /* 사이드바 기본 숨김 */
    .sidebar {
        transform: translateX(-100%);
        padding-top: 80px; /* 햄버거 버튼 공간 확보 */
    }

    /* 사이드바 열렸을 때 */
    .sidebar.active {
        transform: translateX(0);
    }

    /* 본문 영역 전체 너비 */
    .content {
        margin-left: 0;
        width: 100%;
        padding-top: 70px; /* 햄버거 버튼 공간 확보 */
    }

    .desc {
        font-size: 14px;
    }

    /* 오버레이 (사이드바 열렸을 때 배경) */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }
}

