body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 사이드바 */
.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%;
    overflow-y: auto;
    box-sizing: border-box;
    padding-bottom: 50px;
}

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

/* 검색폼 */
#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;
}

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

/* 결과 컨테이너 */
#resultContainer {
    display: none;
}

#coinTitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* 좌우 거래소 컨테이너 */
.exchangeContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 각 거래소 박스 */
.exchangeBox {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 거래소 타이틀 */
.exchangeBox h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 5px;
}

/* 개별 박스 스타일 */
.box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.box .value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 오실레이터 + 이동평균 그리드 */
.grid-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 요약 상세 박스 */
.detail-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.detail-box .detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    font-weight: bold;
}

/* 모바일 반응형 (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;
    }
}
