
.json-formatter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.font-monospace {
    font-family: 'Courier New', Monaco, 'Lucida Console', monospace;
    font-size: 14px;
    line-height: 1.4;
}



/* Search functionality styles */
.search-result-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-highlight {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 3px;
    padding: 2px 4px;
}

.json-path {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 0.9em;
    color: #0066cc;
}

.search-value-preview {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* JSON highlighting */
.json-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* Line highlighting for position display */
.json-line-highlight {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5) !important;
    transition: all 0.3s ease;
}

/* Search result buttons */
.copy-path-btn, .highlight-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.highlight-btn {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.highlight-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
}



/* Status indicators */
.json-status-valid {
    border-left: 4px solid #28a745;
}

.json-status-invalid {
    border-left: 4px solid #dc3545;
}

.json-status-warning {
    border-left: 4px solid #ffc107;
}

/* Error highlighting */
.json-error-line {
    background-color: #f8d7da;
    border-left: 3px solid #dc3545;
    padding-left: 10px;
    margin: 2px 0;
}

/* Statistics styling */
.stat-card {
    text-align: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
}

/* Button animations */
.btn-processing {
    position: relative;
    color: transparent;
}

.btn-processing::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading-spinner 0.8s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Copy success animation */
.btn-copy-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Sample button styling */
.sample-btn {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Responsive design */
@media (max-width: 768px) {
    .font-monospace {
        font-size: 12px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    .json-tree {
        font-size: 12px;
    }
}

/* Textarea enhancements */
.json-input-area {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.json-input-area:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.json-input-valid {
    border-color: #28a745;
}

.json-input-invalid {
    border-color: #dc3545;
}

/* JSON Output Container with Line Numbers */
.json-output-container {
    position: relative;
    display: flex;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 420px; /* 고정 높이 설정 */
}

.line-numbers {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    color: #6c757d;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 8px;
    text-align: right;
    user-select: none;
    width: 50px;
    white-space: pre;
    overflow: hidden;
    height: 100%;
}

.json-output-area {
    flex: 1;
    border: none;
    border-radius: 0;
    resize: none;
    outline: none;
    padding: 10px;
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    white-space: pre; /* 줄바꿈 방지 */
    overflow-x: auto; /* 가로 스크롤 활성화 */
    overflow-y: auto; /* 세로 스크롤 활성화 */
    height: 100%;
}

.json-output-area:focus {
    box-shadow: none;
    border: none;
}

.json-output-container:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Highlighted line styling */
.json-line-highlight {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    box-shadow: inset 0 0 8px rgba(255, 193, 7, 0.3) !important;
    transition: all 0.3s ease;
}

/* Sync scroll between line numbers and textarea */
.line-numbers.synced-scroll {
    overflow-y: hidden;
}
