/* --- JSON Formatter Wrapper --- */
#jf-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: #111827;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151;
    color: white;
}

/* --- Header & Controls --- */
.jf-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #1f2937;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #374151;
}

@media (min-width: 768px) {
    .jf-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.jf-title {
    color: #c084fc; /* Purple */
    font-size: 1rem;
    text-shadow: 2px 2px 0 #000;
}

.jf-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.jf-btn {
    padding: 10px 15px;
    font-family: inherit;
    font-size: 0.6rem;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s ease;
    border-bottom: 3px solid rgba(0,0,0,0.3);
    flex-grow: 1;
}

.jf-btn:active {
    transform: translateY(3px);
    border-bottom: none;
    margin-top: 3px;
}

.jf-btn-format { background-color: #10b981; color: #064e3b; border-bottom-color: #059669; }
.jf-btn-minify { background-color: #f59e0b; color: #78350f; border-bottom-color: #d97706; }
.jf-btn-clear { background-color: #ef4444; color: #7f1d1d; border-bottom-color: #b91c1c; }
.jf-btn-copy { background-color: #3b82f6; color: #1e3a8a; border-bottom-color: #1d4ed8; }

/* --- Editor Container --- */
.jf-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 600px;
    gap: 15px;
}

@media (min-width: 768px) {
    .jf-container {
        flex-direction: row;
    }
}

.jf-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

.jf-label {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.jf-textarea {
    flex-grow: 1;
    background-color: #050505;
    color: #d1d5db;
    border: 1px solid #333;
    padding: 15px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 6px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    white-space: pre;
    overflow: auto;
}

.jf-textarea:focus {
    border-color: #c084fc;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
}

.jf-textarea.error {
    border-color: #ef4444;
    background-color: #1a0505;
}

/* --- Status / Error Bar --- */
#jf-status-bar {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.8rem;
    background-color: #111;
    border: 1px solid #333;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.jf-status-valid { color: #10b981; }
.jf-status-error { color: #ef4444; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #jf-wrapper { padding: 10px; }
    .jf-container { height: auto; }
    .jf-textarea { height: 300px; }
}