    /* Styles specific to the JSON Formatter/Validator Tool */

    .json-formatter-container {
        max-width: 1200px; /* Allow wider layout */
        margin: 1rem auto;
        padding: 1.5rem 2rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background-color: var(--bg-color);
    }

    .json-formatter-container h2 {
        text-align: center;
        margin-bottom: 0.5rem;
        font-size: 1.4rem;
        color: var(--text-color);
    }
    .json-formatter-container .description {
        text-align: center;
        margin-bottom: 2rem;
        font-size: 0.9rem;
        color: var(--label-text);
    }

    .main-layout {
        display: flex;
        gap: 2rem;
        flex-wrap: wrap; /* Allow stacking */
    }

    .input-area, .output-area {
        flex: 1;
        min-width: 350px; /* Minimum width before stacking */
        display: flex;
        flex-direction: column;
    }

    .input-area label, .output-area label:not(.indent-options label) {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--label-text);
    }

    #json-input {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
        font-size: 0.95rem;
        background-color: var(--bg-color);
        color: var(--text-color);
        resize: vertical;
        min-height: 300px;
        line-height: 1.5;
        flex-grow: 1; /* Allow textarea to grow */
        margin-bottom: 0.8rem;
    }
    #json-input:focus {
        border-color: var(--accent-color);
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    }
    body.dark-mode #json-input:focus {
        box-shadow: 0 0 0 2px rgba(102, 191, 255, 0.25);
    }

    .input-actions {
        display: flex;
        gap: 0.8rem;
        align-items: center;
    }
    .input-actions #json-file-input {
        display: none; /* Hide actual file input */
    }

    .status-message {
        font-size: 0.85rem;
        color: var(--label-text);
        margin-top: 0.5rem;
        min-height: 1.2em;
    }

    .controls {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px dashed var(--border-color);
    }

    .indent-options {
        border: none;
        padding: 0;
        margin: 0;
        display: flex;
        gap: 0.8rem;
        flex-wrap: wrap;
    }
    .indent-options legend {
        font-weight: 500;
        color: var(--label-text);
        padding: 0;
        margin-right: 0.5rem;
        font-size: 0.9rem;
    }
    .indent-options label {
        font-size: 0.9rem;
        cursor: pointer;
        white-space: nowrap;
    }
    .indent-options input[type="radio"] {
        margin-right: 0.3rem;
        accent-color: var(--accent-color);
    }

    .control-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        font-weight: 500;
        border-radius: 4px;
        border: none;
        cursor: pointer;
        transition: opacity 0.2s, background-color 0.2s;
        white-space: nowrap;
    }

    .control-button.format {
        background-color: var(--accent-color);
        color: var(--bg-color-light);
        margin-left: auto; /* Push format button right */
    }
    body.dark-mode .control-button.format {
        color: var(--bg-color-dark);
    }
    .control-button.format:hover { opacity: 0.9; }

    .control-button.upload {
        background-color: #6c757d;
        color: white;
    }
    .control-button.upload:hover { background-color: #5a6268; }

    .control-button.clear {
        background-color: #dc3545;
        color: white;
    }
    .control-button.clear:hover { background-color: #c82333; }

    #output-container {
        flex-grow: 1; /* Allow output to take remaining space */
        display: flex;
        flex-direction: column;
        position: relative; /* For copy/download buttons */
    }
    #output-container.hidden { display: none; }

    .output-controls {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        gap: 0.5rem;
        z-index: 2; /* Above the <pre> block */
    }

    .control-button.copy, .control-button.download {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        background-color: var(--label-text);
        color: var(--bg-color);
        opacity: 0.8;
    }
    .control-button.copy:hover, .control-button.download:hover { opacity: 1; }

    .copy-status-message {
        position: absolute;
        top: 5px;
        right: 120px; /* Adjust based on button sizes */
        font-size: 0.8rem;
        color: var(--accent-color);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        pointer-events: none;
    }
    .copy-status-message.visible { opacity: 1; }

    #json-output-pre {
        flex-grow: 1;
        margin: 0;
        padding: 0.8rem;
        padding-top: 2.5rem; /* Space for buttons */
        border: 1px solid var(--border-color);
        border-radius: 4px;
        background-color: var(--bg-color);
        overflow: auto; /* Scroll for large content */
        min-height: 200px; /* Ensure minimum height */
    }
    #json-output {
        font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
        font-size: 0.9rem;
        color: var(--text-color);
        line-height: 1.5;
        white-space: pre; /* Preserve whitespace from stringify */
        display: block; /* Ensure code takes block space */
    }

    .error-message {
        color: var(--error-text);
        font-size: 0.9rem;
        margin-top: 0.8rem;
        padding: 0.5rem;
        border: 1px solid var(--error-text);
        border-radius: 4px;
        background-color: rgba(220, 53, 69, 0.1);
        white-space: pre-wrap; /* Allow error messages to wrap */
    }
    body.dark-mode .error-message {
        background-color: rgba(255, 69, 58, 0.15);
    }

    .hidden { display: none; }

    /* Basic Syntax Highlighting Styles */
    .json-key { color: #990055; font-weight: bold; } /* Magenta-like */
    .json-string { color: #2a9d8f; } /* Teal-like */
    .json-number { color: #e76f51; } /* Orange-like */
    .json-boolean { color: #007bff; } /* Blue */
    .json-null { color: #6c757d; } /* Grey */

    body.dark-mode .json-key { color: #e06c75; } /* Light red */
    body.dark-mode .json-string { color: #98c379; } /* Light green */
    body.dark-mode .json-number { color: #d19a66; } /* Light orange */
    body.dark-mode .json-boolean { color: #56b6c2; } /* Light cyan */
    body.dark-mode .json-null { color: #adb5bd; } /* Light grey */


    /* Responsive */
    @media (max-width: 768px) {
        .main-layout { flex-direction: column; }
        .controls { flex-direction: column; align-items: flex-start; }
        .control-button.format { margin-left: 0; width: 100%; margin-top: 0.5rem;}
        .input-area, .output-area {min-width:100%!important;width:100%!important;}
    }
    