/* 마크다운 에디터 스타일 - json-csv-converter 디자인 언어 차용 (indigo/violet 테마) */
.md-tool {
    --tool-primary: #4338ca;
    --tool-bg: #eef2ff;
    --tool-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

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

/* 툴바 */
.md-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-icon {
    padding: 6px 9px;
    font-size: 15px;
    line-height: 1;
}
.btn-action-icon i {
    line-height: 1;
}
.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(67, 56, 202, 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: 498px;
    resize: none;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fb;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.7;
    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(67, 56, 202, 0.12);
}

/* 통계 바 */
.md-stats-bar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    color: #868e96;
    font-size: 13.5px;
}
.md-stats-bar strong {
    color: var(--tool-primary);
}

/* 서포트 카드 */
.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;
}

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

/* ==========================================
   미리보기 영역 타이포그래피 (인디고 테마로 재조정)
   ========================================== */
.md-preview-output {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    line-height: 1.8;
    font-size: 0.95rem;
    color: #333;
    word-wrap: break-word;
}

/* 미리보기 제목 */
.md-preview-output h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.8em 0 0.4em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #e9ecef;
}
.md-preview-output h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.8em 0 0.4em;
    padding-bottom: 0.25em;
    border-bottom: 1px solid #e9ecef;
}
.md-preview-output h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.7em 0 0.3em;
}
.md-preview-output h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.6em 0 0.3em;
}
.md-preview-output h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5em 0 0.2em;
}
.md-preview-output h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.5em 0 0.2em;
    color: #6c757d;
}

/* 미리보기 단락 */
.md-preview-output p {
    margin: 0.6em 0;
}

/* 미리보기 인라인 코드 */
.md-preview-output .md-inline-code {
    background-color: #eef2ff;
    color: #4338ca;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.88em;
}

/* 미리보기 코드 블록 (catppuccin 다크) */
.md-preview-output .md-code-block {
    background-color: #1e1e2e;
    color: #cdd6f4;
    padding: 1em 1.2em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.8em 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.88em;
    line-height: 1.6;
}
.md-preview-output .md-code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* 미리보기 인용문 */
.md-preview-output blockquote {
    border-left: 4px solid var(--tool-primary);
    padding: 0.5em 1em;
    margin: 0.8em 0;
    background-color: var(--tool-bg);
    color: #555;
    border-radius: 0 6px 6px 0;
}

/* 미리보기 목록 */
.md-preview-output ul,
.md-preview-output ol {
    padding-left: 1.8em;
    margin: 0.5em 0;
}
.md-preview-output li {
    margin: 0.25em 0;
}

/* 미리보기 구분선 */
.md-preview-output hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 1.5em 0;
}

/* 미리보기 표 */
.md-preview-output .md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8em 0;
    font-size: 0.92em;
}
.md-preview-output .md-table th,
.md-preview-output .md-table td {
    border: 1px solid #dee2e6;
    padding: 0.5em 0.75em;
}
.md-preview-output .md-table th {
    background-color: #f1f3f5;
    font-weight: 600;
}
.md-preview-output .md-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 미리보기 이미지 */
.md-preview-output .md-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
}

/* 미리보기 링크 */
.md-preview-output a {
    color: var(--tool-primary);
    text-decoration: none;
}
.md-preview-output a:hover {
    text-decoration: underline;
}

/* 미리보기 강조 */
.md-preview-output strong {
    font-weight: 700;
}
.md-preview-output del {
    color: #999;
}

/* ==========================================
   전체 화면 모드 (JS: .markdown-editor-tool + .md-fullscreen)
   ========================================== */
.md-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;
}
.md-fullscreen .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.md-fullscreen .row.g-4 {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.md-fullscreen .col-12 {
    flex: 1;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.md-fullscreen .md-hero {
    display: none;
}
.md-fullscreen #editorRow {
    flex: 1;
    min-height: 0;
}
.md-fullscreen #editorRow > .col-lg-6 {
    display: flex;
}
.md-fullscreen #editorRow > .col-lg-6 > .editor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.md-fullscreen #editorRow > .col-lg-6 > .editor-card > .editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.md-fullscreen #mdInput {
    flex: 1;
    height: auto !important;
    resize: none;
}
.md-fullscreen #mdPreview {
    flex: 1;
    height: auto !important;
}
.md-fullscreen .md-stats-bar,
.md-fullscreen .support-card,
.md-fullscreen .text-center.mt-4,
.md-fullscreen .en-comments-section {
    display: none !important;
}

/* 반응형 */
@media (max-width: 768px) {
    .md-hero { padding: 28px 20px; border-radius: 12px; }
    .md-hero h1 { font-size: 22px; }
    .editor-textarea { height: 320px; }
    .md-preview-output { height: 320px !important; }
    .md-stats-bar { gap: 16px; }
}
</content>
