/* =========================================================
   143TOOL - JSON Formatter Styles
   Version: 1.0.0
   ========================================================= */

.jf-card {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- OPTIONS ---------- */
.jf-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jf-options-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.jf-options-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jf-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.jf-option select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.jf-option-check {
    cursor: pointer;
}

.jf-option-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.jf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
}

.jf-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.jf-btn-ghost {
    background: transparent;
}

/* ---------- TWO PANELS ---------- */
.jf-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.jf-panel {
    display: flex;
    flex-direction: column;
}

.jf-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.jf-panel-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
}

.jf-panel-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.jf-textarea {
    flex: 1;
    width: 100%;
    min-height: 380px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--body-bg);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease;
    tab-size: 2;
}

.jf-textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.jf-textarea::placeholder {
    color: var(--text-muted);
    opacity: .65;
    font-style: italic;
}

.jf-textarea-output {
    background: color-mix(in srgb, var(--primary) 2%, var(--body-bg));
}

/* ---------- ACTION BUTTONS ---------- */
.jf-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jf-actions .btn {
    flex: 1 1 auto;
    min-width: 140px;
}

.jf-actions .btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ---------- STATUS ---------- */
.jf-status {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
    word-break: break-word;
}

.jf-status-success {
    background: color-mix(in srgb, var(--success) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--success) 35%, var(--border));
    color: var(--success);
}

.jf-status-error {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
    color: var(--danger);
}

.jf-status-icon {
    flex-shrink: 0;
    font-size: 15px;
}

/* ---------- STATS ---------- */
.jf-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.jf-stat {
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.jf-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.jf-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .jf-panels {
        grid-template-columns: 1fr;
    }
    .jf-textarea {
        min-height: 260px;
    }
    .jf-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .jf-card {
        padding: 16px;
    }
    .jf-options {
        flex-direction: column;
        align-items: stretch;
    }
    .jf-options-left {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .jf-options-right {
        justify-content: flex-end;
    }
    .jf-actions .btn {
        min-width: 0;
        flex-basis: 100%;
    }
    .jf-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .jf-textarea {
        min-height: 220px;
        font-size: 12px;
    }
}
/* =========================================================
   SEO ARTICLE / ADSENSE CONTENT
   ========================================================= */

.tool-article {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.tool-article h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 36px 0 14px;
    line-height: 1.3;
    letter-spacing: -.4px;
}

.tool-article h2:first-child {
    margin-top: 0;
}

.tool-article h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 10px;
    line-height: 1.4;
}

.tool-article p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.tool-article ul,
.tool-article ol {
    padding-left: 22px;
    margin: 0 0 18px;
}

.tool-article li {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tool-article strong {
    color: var(--text);
    font-weight: 700;
}

.tool-article a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease;
}

.tool-article a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.tool-article code {
    padding: 2px 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 620px) {
    .tool-article {
        padding: 20px 0;
        margin: 40px auto 20px;
    }
    .tool-article h2 {
        font-size: 20px;
        margin: 28px 0 12px;
    }
    .tool-article h3 {
        font-size: 16px;
        margin: 20px 0 8px;
    }
    .tool-article p,
    .tool-article li {
        font-size: 15px;
        line-height: 1.7;
    }
}