/* 전역 스타일: 가로 스크롤바 방지 */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
}

.container-fluid {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* 네비게이션 바 좌우 여백 추가 */
.navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* CodeMirror 6 Base Styles */
.cm-editor {
    height: 100%;
    font-size: 14px;
    font-family: "Nanum Gothic Coding", monospace;
    font-weight: 400;
    font-style: normal;
}
.cm-scroller {
    overflow: auto;
}
#editor-container {
    border: 1px solid #ddd;
}

/* Resizer 스타일 */
.resizer {
    width: 3px;
    padding: 0;
    margin: 0;
    background-color: #333;
    cursor: col-resize;
    user-select: none;
    position: relative;
    z-index: 10;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.resizer:hover {
    background-color: #555;
}

.resizer:active {
    background-color: #007bff;
}

/* 데스크톱에서만 리사이저 표시 */
@media (max-width: 767.98px) {
    .resizer {
        display: none;
    }
}

/* 결과 콘솔 영역 스크롤 처리 */
#result-console {
    max-height: 400px;
    overflow-y: auto;
}

/* 공유 버튼 스타일 */
#share-btn {
    white-space: nowrap;
    min-width: 38px;
}

#share-icon {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

#share-btn:hover #share-icon {
    transform: scale(1.1);
}

/* 드래그 리사이저를 위한 레이아웃 조정 */
@media (min-width: 768px) {
    .container-fluid > .row {
        display: flex;
        flex-wrap: nowrap;
    }

    #left-panel {
        flex: 0 0 auto;
        position: relative;
    }

    #right-panel {
        flex: 0 0 auto;
        position: relative;
    }

    .resizer {
        flex: 0 0 3px;
        flex-shrink: 0;
        position: relative;
    }
}
