/* Main container for responsive layout */
.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Card styling for both containers */
.form-container,
.json-container {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(97, 74, 244, 0.1);
    padding: 28px;
    flex: 1;
    min-width: 300px;
    max-height: 650px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #F2F0FE;
}

.form-container h3,
.json-container h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
    border-bottom: 2px solid rgba(97, 74, 244, 0.15);
    padding-bottom: 12px;
}

/* JSON content wrapper - scrollable flex item */
.json-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    background: #fcfcfc;
    border-radius: 8px;
    padding: 16px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

#jsonOutput {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e0e0e0;
}

#placeholderDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9ca3af;
    text-align: center;
    font-size: 18px;
}

#placeholderDiv .placeholderImage {
    margin-top: 16px;
}

/* Scrollbar styling for json content */
.json-content::-webkit-scrollbar {
    width: 10px;
}

.json-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.json-content::-webkit-scrollbar-thumb {
    background: rgba(97, 74, 244, 0.5);
    border-radius: 5px;
}

.json-content::-webkit-scrollbar-thumb:hover {
    background: rgba(97, 74, 244, 0.7);
}

/* Desktop: 2 columns side by side */
@media (min-width: 1024px) {
    .container {
        flex-wrap: nowrap;
    }

    .form-container {
        flex: 1 1 45%;
        max-width: 600px;
    }

    .json-container {
        flex: 1 1 55%;
    }
}

/* Tablet: Still 2 columns but closer */
@media (min-width: 768px) and (max-width: 1023px) {
    .form-container,
    .json-container {
        flex: 1 1 48%;
    }
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .form-container,
    .json-container {
        width: 100%;
        padding: 16px;
    }
}
