/* JSON CSV 변환기 스타일 - mockup-generator 디자인 언어 차용 (emerald/teal 테마) */
.json-csv-converter-tool {
    --tool-primary: #059669;
    --tool-bg: #ecfdf5;
    --tool-gradient: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

/* 히어로 */
.jcc-hero {
    background: var(--tool-gradient);
    border-radius: 16px;
    padding: 36px 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}
.jcc-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.jcc-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}
.jcc-hero h1 {
    font-size: 28px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin: 10px 0 6px;
}
.jcc-hero p {
    opacity: 0.85;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* 모드 토글 (nav-pills) */
.json-csv-converter-tool .nav-pills .nav-link {
    color: #495057;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 10px;
    margin: 0 4px;
    transition: all 0.2s;
}
.json-csv-converter-tool .nav-pills .nav-link.active {
    background: var(--tool-gradient);
    border-color: transparent;
    color: #fff;
}
.json-csv-converter-tool .nav-pills .nav-link:not(.active):hover {
    border-color: var(--tool-primary);
    color: var(--tool-primary);
    background: var(--tool-bg);
}

/* 툴바 */
.json-toolbar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 9px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-action:hover {
    border-color: var(--tool-primary);
    color: var(--tool-primary);
    background: var(--tool-bg);
}
.btn-action-sm {
    padding: 5px 11px;
    font-size: 12.5px;
    border-radius: 8px;
}
.btn-action-primary {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
}
.btn-action-primary:hover {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.3);
}
.toolbar-divider {
    width: 1px;
    align-self: stretch;
    background: #e9ecef;
    margin: 0 2px;
}

/* 에디터 카드 */
.editor-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
}
.editor-title {
    font-weight: 700;
    font-size: 14px;
    color: #343a40;
}
.editor-title i {
    color: var(--tool-primary);
}
.size-badge {
    font-size: 12px;
    font-weight: 600;
    color: #868e96;
    background: #f1f3f5;
    padding: 3px 10px;
    border-radius: 20px;
}
.editor-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.editor-textarea {
    width: 100%;
    height: 460px;
    resize: none;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fb;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #212529;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    tab-size: 4;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
.editor-textarea:focus {
    border-color: var(--tool-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* 출력 영역 (catppuccin 다크 + JSON 신택스 하이라이팅) */
.converter-output {
    background-color: #1e1e2e !important;
    color: #cdd6f4;
    border-radius: 12px !important;
    line-height: 1.6;
    margin: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
.converter-output .json-key { color: #89b4fa; }
.converter-output .json-string { color: #a6e3a1; }
.converter-output .json-number { color: #fab387; }
.converter-output .json-boolean { color: #cba6f7; }
.converter-output .json-null { color: #f38ba8; font-style: italic; }

/* 드래그 앤 드롭 오버레이 */
.drop-overlay {
    background-color: rgba(5, 150, 105, 0.08);
    border: 2px dashed var(--tool-primary);
    z-index: 10;
    pointer-events: none;
}
.drop-overlay i,
.drop-overlay p {
    color: var(--tool-primary) !important;
}

/* 서포트 카드 */
.support-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
}
.support-card .card-hd {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f5;
}
.support-card .card-bd {
    padding: 18px;
}
.support-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #343a40;
    margin: 18px 0 10px;
}

/* 아코디언 */
.json-csv-converter-tool .accordion-button:not(.collapsed) {
    background-color: var(--tool-bg);
    color: var(--tool-primary);
    box-shadow: none;
}
.json-csv-converter-tool .accordion-button:focus {
    box-shadow: none;
}

/* 전체 화면 모드 */
.jcc-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
    margin: 0 !important;
    padding: 15px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen .row.g-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen .col-12 {
    flex: 1;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen .jcc-hero {
    display: none;
}
.jcc-fullscreen .d-flex.justify-content-center.mb-3 {
    margin-bottom: 0.5rem !important;
}
.jcc-fullscreen #editorRow {
    flex: 1;
    min-height: 0;
}
.jcc-fullscreen #editorRow > .col-lg-6 {
    display: flex;
}
.jcc-fullscreen #editorRow > .col-lg-6 > .editor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen #editorRow > .col-lg-6 > .editor-card > .editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen #dropZone {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.jcc-fullscreen #dataInput {
    flex: 1;
    height: auto !important;
    resize: none;
}
.jcc-fullscreen #outputWrap {
    flex: 1;
    height: auto !important;
}
.jcc-fullscreen .support-card,
.jcc-fullscreen .text-center.mt-4,
.jcc-fullscreen .en-comments-section {
    display: none !important;
}

/* 반응형 */
@media (max-width: 768px) {
    .jcc-hero { padding: 28px 20px; border-radius: 12px; }
    .jcc-hero h1 { font-size: 22px; }
    .editor-textarea { height: 280px; }
    .converter-output { height: 280px !important; }
}
