/* =====================================================
   FREEVEXA — JSON FORMATTER
===================================================== */

.json-page {
    min-height: 100vh;
    padding: 130px 20px 80px;
}

.json-container {
    width: min(1200px, 100%);
    margin: 0 auto;
}


/* ================= BREADCRUMB ================= */

.json-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 45px;
    font-size: 14px;
    color: #8b93a1;
}

.json-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.json-breadcrumb a:hover {
    color: #00f0ff;
}


/* ================= HEADER ================= */

.json-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 55px;
}

.json-tool-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 18px;

    background: rgba(0, 240, 255, 0.07);

    color: #00f0ff;

    font-family: monospace;
    font-size: 24px;

    box-shadow:
        0 0 35px rgba(0, 240, 255, 0.08);
}

.json-label {
    display: inline-block;
    margin-bottom: 12px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;

    color: #00f0ff;
}

.json-header h1 {
    margin: 0;

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -2px;
}

.json-header h1 span {
    color: #00f0ff;
}

.json-header p {
    max-width: 650px;
    margin: 20px auto 0;

    color: #9ca5b4;
    font-size: 17px;
    line-height: 1.7;
}

.json-privacy {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 20px;
    padding: 9px 14px;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;

    background: rgba(255,255,255,0.03);

    color: #8f98a7;
    font-size: 13px;
}


/* ================= CARD ================= */

.json-card {
    overflow: hidden;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;

    background: rgba(15, 23, 42, 0.62);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
        0 25px 80px rgba(0,0,0,0.25);
}


/* ================= TOOLBAR ================= */

.json-toolbar {
    min-height: 64px;
    padding: 0 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.json-toolbar-left,
.json-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.json-toolbar-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #8e98a8;
}

.json-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-size: 12px;
    color: #8e98a8;
}

.json-status span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #00f0ff;
    box-shadow: 0 0 10px rgba(0,240,255,0.6);
}

.indent-label {
    color: #8993a2;
    font-size: 13px;
}

#indentSize {
    min-width: 110px;

    padding: 9px 12px;

    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 9px;

    background: rgba(255,255,255,0.04);
    color: #dce2ea;

    outline: none;
}


/* ================= EDITOR ================= */

.json-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;

    background: rgba(255,255,255,0.07);
}

.json-panel {
    min-width: 0;
    background: #090d15;
}

.json-panel-header {
    height: 48px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(255,255,255,0.06);

    color: #d8dee8;
    font-size: 13px;
    font-weight: 600;
}

.json-count {
    color: #667181;
    font-size: 11px;
    font-weight: 400;
}

.json-panel textarea {
    display: block;

    width: 100%;
    height: 430px;

    padding: 20px;

    resize: vertical;

    border: 0;
    outline: 0;

    background: transparent;

    color: #dce5ef;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 14px;
    line-height: 1.7;

    tab-size: 2;
}

.json-panel textarea::placeholder {
    color: #4d5665;
}

#jsonOutput {
    color: #aee9ef;
}

.json-panel-footer {
    min-height: 55px;
    padding: 10px 14px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;

    border-top: 1px solid rgba(255,255,255,0.06);
}


/* ================= SMALL BUTTONS ================= */

.json-small-btn {
    padding: 8px 13px;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;

    background: rgba(255,255,255,0.04);
    color: #aeb7c4;

    font-size: 12px;

    cursor: pointer;

    transition: 0.2s ease;
}

.json-small-btn:hover:not(:disabled) {
    border-color: rgba(0,240,255,0.35);
    color: #00f0ff;
    background: rgba(0,240,255,0.06);
}

.json-small-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


/* ================= ERROR ================= */

.json-error {
    margin: 18px 20px 0;
    padding: 15px 17px;

    display: flex;
    align-items: flex-start;
    gap: 13px;

    border: 1px solid rgba(255,70,100,0.2);
    border-radius: 12px;

    background: rgba(255,70,100,0.06);
}

.json-error-icon {
    width: 27px;
    height: 27px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255,70,100,0.12);
    color: #ff7189;

    font-weight: 700;
}

.json-error strong {
    display: block;
    margin-bottom: 4px;

    color: #ff8a9e;
    font-size: 13px;
}

.json-error p {
    margin: 0;

    color: #9c6973;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
}


/* ================= ACTIONS ================= */

.json-actions {
    padding: 20px;

    display: flex;
    justify-content: center;
    gap: 10px;

    border-top: 1px solid rgba(255,255,255,0.06);
}

.json-format-btn,
.json-minify-btn,
.json-reset-btn {
    min-height: 46px;
    padding: 0 20px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

.json-format-btn {
    border: 1px solid rgba(0,240,255,0.25);
    background: rgba(0,240,255,0.09);
    color: #00f0ff;
}

.json-format-btn:hover {
    background: rgba(0,240,255,0.15);
    transform: translateY(-1px);
}

.json-format-btn span {
    margin-right: 6px;
}

.json-minify-btn {
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    color: #c1c8d3;
}

.json-minify-btn:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.07);
}

.json-reset-btn {
    border: 1px solid rgba(255,255,255,0.07);
    background: transparent;
    color: #778190;
}

.json-reset-btn:hover {
    color: #c2c8d2;
}


/* ================= INFO ================= */

.json-info-grid {
    margin-top: 35px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.json-info-card {
    padding: 25px;

    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;

    background: rgba(255,255,255,0.025);
}

.json-info-icon {
    margin-bottom: 15px;
    font-size: 23px;
}

.json-info-card h3 {
    margin: 0 0 8px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.json-info-card p {
    margin: 0;

    color: #7f8998;
    font-size: 13px;
    line-height: 1.7;
}


/* ================= LIGHT MODE ================= */

.light-mode .json-card {
    background: rgba(255,255,255,0.75);
    border-color: rgba(0,0,0,0.08);
}

.light-mode .json-panel {
    background: #f7f9fb;
}

.light-mode .json-panel-header {
    border-color: rgba(0,0,0,0.07);
    color: #252b34;
}

.light-mode .json-panel textarea {
    color: #202733;
}

.light-mode #jsonOutput {
    color: #176d75;
}

.light-mode .json-panel-footer,
.light-mode .json-toolbar {
    border-color: rgba(0,0,0,0.07);
}

.light-mode #indentSize {
    background: #fff;
    color: #222;
    border-color: rgba(0,0,0,0.12);
}


/* ================= RESPONSIVE ================= */

@media (max-width: 850px) {

    .json-editor-grid {
        grid-template-columns: 1fr;
    }

    .json-info-grid {
        grid-template-columns: 1fr;
    }

    .json-toolbar {
        padding: 12px 15px;
        gap: 12px;
    }

    .json-toolbar-right {
        gap: 7px;
    }

}


@media (max-width: 600px) {

    .json-page {
        padding: 110px 14px 60px;
    }

    .json-header h1 {
        letter-spacing: -1px;
    }

    .json-header p {
        font-size: 15px;
    }

    .json-toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .json-panel textarea {
        height: 330px;
        font-size: 13px;
    }

    .json-actions {
        flex-wrap: wrap;
    }

    .json-format-btn {
        width: 100%;
    }

}