/* JSON Encode Interface */
.json-encode-interface {
    margin-bottom: 48px;
}

.encode-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.encode-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.encode-columns {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 264px);
}

.encode-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.encode-column-input {
    border-right: 1px solid var(--border-color, #e5e7eb);
}

.encode-column-output {
    border-left: none;
}

.encode-divider {
    width: 1px;
    background: var(--border-color, #e5e7eb);
    flex-shrink: 0;
}

.encode-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background: var(--header-bg, #f9fafb);
    flex-wrap: wrap;
    gap: 16px;
    flex-shrink: 0;
}

.encode-title-group {
    flex: 1;
    min-width: 200px;
}

.encode-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary, #111827);
}

.encode-subtitle {
    font-size: 14px;
    color: var(--text-muted, #6b7280);
    margin: 0;
}

.encode-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #374151);
    background: var(--button-bg, #ffffff);
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-action:hover {
    background: var(--button-hover-bg, #f3f4f6);
    border-color: var(--border-hover-color, #9ca3af);
    color: var(--text-primary, #111827);
}

.btn-action:active {
    transform: scale(0.98);
}

.btn-action svg {
    flex-shrink: 0;
}

.encode-editor-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.editor-container {
    width: 100%;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    height: 100%;
}

.editor-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--status-bg, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 13px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-default, #9ca3af);
    flex-shrink: 0;
}

.status-indicator.success {
    background: var(--status-success, #10b981);
}

.status-indicator.error {
    background: var(--status-error, #ef4444);
}

.status-text {
    color: var(--text-muted, #6b7280);
}

/* Info Section */
.encode-info-section {
    margin-top: 48px;
    margin-bottom: 32px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    padding: 24px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg, #f3f4f6);
    border-radius: 10px;
    color: var(--icon-color, #3b82f6);
    margin-bottom: 16px;
}

.info-icon svg {
    width: 24px;
    height: 24px;
}

.info-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary, #111827);
}

.info-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #4b5563);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .encode-columns {
        flex-direction: column;
        min-height: auto;
    }

    .encode-column-input {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

    .encode-column-output {
        border-left: none;
    }

    .encode-divider {
        width: 100%;
        height: 1px;
        background: var(--border-color, #e5e7eb);
    }

    .encode-header {
        padding: 16px;
    }

    .encode-title {
        font-size: 18px;
    }

    .encode-subtitle {
        font-size: 13px;
    }

    .encode-actions {
        width: 100%;
    }

    .btn-action {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .editor-container {
        min-height: 250px;
    }

    .encode-info-section {
        margin-top: 32px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .encode-header {
        flex-direction: column;
        align-items: stretch;
    }

    .encode-actions {
        justify-content: stretch;
    }

    .btn-action {
        flex: 1;
    }

    .editor-container {
        min-height: 200px;
    }
}

/* Dark mode support (if applicable) */
@media (prefers-color-scheme: dark) {
    .encode-card {
        background: var(--card-bg-dark, #1f2937);
        border-color: var(--border-color-dark, #374151);
    }

    .encode-header {
        background: var(--header-bg-dark, #111827);
        border-color: var(--border-color-dark, #374151);
    }

    .encode-title {
        color: var(--text-primary-dark, #f9fafb);
    }

    .encode-subtitle {
        color: var(--text-muted-dark, #9ca3af);
    }

    .btn-action {
        background: var(--button-bg-dark, #374151);
        border-color: var(--border-color-dark, #4b5563);
        color: var(--text-primary-dark, #e5e7eb);
    }

    .btn-action:hover {
        background: var(--button-hover-bg-dark, #4b5563);
        border-color: var(--border-hover-color-dark, #6b7280);
    }

    .editor-status {
        background: var(--status-bg-dark, #111827);
        border-color: var(--border-color-dark, #374151);
    }

    .status-text {
        color: var(--text-muted-dark, #9ca3af);
    }

    .encode-divider {
        background: var(--border-color-dark, #374151);
    }

    .encode-column-input {
        border-right-color: var(--border-color-dark, #374151);
    }

    @media (max-width: 767px) {
        .encode-column-input {
            border-bottom-color: var(--border-color-dark, #374151);
        }

        .encode-divider {
            background: var(--border-color-dark, #374151);
        }
    }

    .info-card {
        background: var(--card-bg-dark, #1f2937);
        border-color: var(--border-color-dark, #374151);
    }

    .info-icon {
        background: var(--icon-bg-dark, #374151);
        color: var(--icon-color-dark, #60a5fa);
    }

    .info-title {
        color: var(--text-primary-dark, #f9fafb);
    }

    .info-text {
        color: var(--text-secondary-dark, #d1d5db);
    }
}
